Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Metrics::Any::Adapter:UsereContributed Perl DocuMetrics::Any::Adapter::File(3)

NAME
       "Metrics::Any::Adapter::File" - write metrics to	a file

SYNOPSIS
	  use Metrics::Any::Adapter 'File', path => "metrics.log";

DESCRIPTION
       This Metrics::Any adapter type writes observations of metric values
       into a file. This may be	helpful	while debugging	or otherwise testing
       code that reports metrics.

       For example, by setting the "METRICS_ANY_ADAPTER" environment variable
       to configure the	adapter, a metric log will be written as a side-effect
       of running a unit test:

	  $ METRICS_ANY_ADAPTER=File:path=metrics.log perl -Mblib t/01test.t

       The generated file can then be inspected	to see what metric values were
       reported	while the program was running.

       In particular, specifying the file /dev/null allows the full metrics
       generation path to be tested with the code under	test seeing a "real"
       adapter even though the output goes nowhere.

	  $ METRICS_ANY_ADAPTER=File:path=/dev/null ./Build test

       Distribution and	timing metrics are tracked with	a running total	and
       count of	observations.

ARGUMENTS
       The following additional	arguments are recognised

   path
       The path	to the file to write to.

AUTHOR
       Paul Evans <leonerd@leonerd.org.uk>

perl v5.32.0			  2020-08-09	Metrics::Any::Adapter::File(3)

NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Metrics::Any::Adapter::File&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help