GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Metrics::Any::Adapter::File(3) User Contributed Perl Documentation Metrics::Any::Adapter::File(3)

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

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

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.

The following additional arguments are recognised

The path to the file to write to.

Paul Evans <leonerd@leonerd.org.uk>
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.