vibrato 0.1.0

Fast Librato.com client for vibe.d with local aggregation


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

vibrato

Fast Librato.com client for vibe.d with local aggregation.

The library spawns a helper thread to perform aggregations and to send the metric data asynchronously.

The goal was to keep impact on the main thread to a minimum. Contention is kept to a minimum by using a double-buffer and performing as much work on the helper thread as possible.

There is a callback that can be used to call user code from the helper thread before performing aggregation and sending.

Example usage:

import vibrato;

enum MyMetrics {
	cpu_user_time,
	cpu_usage,
	page_views,
	request_time,
}

auto settings = Settings("[email protected]", "75AFDB82", "frontend.0", "frontend.0.");

init(settings);

// bind metric names
metric(cpu_user_time, cpu_user_time.stringof, MetricType.Gauge);
metric(cpu_usage, cpu_usage.stringof, MetricType.Gauge);
metric(page_views, page_views.stringof, MetricType.Counter);
metric(request_time, request_time.stringof, MetricType.Gauge);

// start the sending and aggregation thread
start();

...

increment(page_views);

auto requestTimer = StopWatch(AutoStart.yes);
...
timed(request_time, requestTimer.peek);

...
gauge(cpu_usage, getCPUUsage());

notes

Have a look at src/vibrato/api.d for a list of all options

Authors:
  • Márcio Martins
Dependencies:
vibe-d
Versions:
0.1.4 2015-May-04
0.1.3 2015-Apr-22
0.1.2 2015-Apr-22
0.1.1 2015-Apr-20
0.1.0 2015-Apr-19
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 247 downloads total

Score:
1.3
Short URL:
vibrato.dub.pm