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
Prometheus::Tiny::Shared(3) User Contributed Perl Documentation Prometheus::Tiny::Shared(3)

Prometheus::Tiny::Shared - A tiny Prometheus client with a shared database behind it

    use Prometheus::Tiny::Shared;
    my $prom = Prometheus::Tiny::Shared->new;

"Prometheus::Tiny::Shared" is a wrapper around Prometheus::Tiny that instead of storing metrics data in a hashtable, stores them in a shared datastore (provided by Hash::SharedMem, though this may change in the future). This lets you keep a single set of metrics in a multithreaded app.

"Prometheus::Tiny::Shared" should be a drop-in replacement for "Prometheus::Tiny". Any differences in behaviour is a bug, and should be reported.

    my $prom = Prometheus::Tiny::Shared->new(filename => ...);

"filename", if provided, will name an on-disk location to store the backing store. If not supplied, a temporary location will be created and destroyed when your program ends, so suitable for testing purposes. For best performance, this should be stored on some kind of memory-backed filesystem (eg Linux "tmpfs"). The store is not intended to be a persistant, durable store (Prometheus will handle metrics resetting to zero correctly), so you don't need to worry about backing it up or any other maintenance.

"init_file", if set to true, will overwrite any existing data file with the given name. If you do this while you already have existing "Prometheus::Tiny::Shared" objects using the old file, strange things will probably happen. Don't do that.

The "cache_args" argument will cause the constructor to croak. Code using this arg in previous versions of Prometheus::Tiny::Shared no longer work, and needs to be updated to use the "filename" argument instead.

Please report any bugs or feature requests through the issue tracker at <https://github.com/robn/Prometheus-Tiny-Shared/issues>. You will be notified automatically of any progress on your issue.

This is open source software. The code repository is available for public review and contribution under the terms of the license.

<https://github.com/robn/Prometheus-Tiny-Shared>

  git clone https://github.com/robn/Prometheus-Tiny-Shared.git

Rob N ★ <robn@despairlabs.com>

This software is copyright (c) 2017 by Rob Norris <robn@despairlabs.com>

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2023-09-07 perl v5.40.2

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.