Commit graph

13 commits

Author SHA1 Message Date
Johan Tibell
b02310ea1e Try to link to ekg-core instead of re-exports in docs 2014-04-30 22:24:44 +02:00
Johan Tibell
340fe7005d Add deprecation notice to metrics modules
Users should import these modules from the ekg-core package instead.
2014-04-30 22:12:47 +02:00
Johan Tibell
0f8352cff3 Break out core metric tracking into a new package
The new package, ekg-core, contains the metrics store, modules for
defining metrics, and functions for sampling the metrics.

The counter naming is also changed to include a namespace part. For
example "myapp.requests".

Finally the JSON format has been changed to be more self-descriptive.
2014-04-20 10:18:13 +02:00
Johan Tibell
52bc89f474 Fix memory leak in new counter implementation
Since we're allocating memory for use outside Haskell, we're
responsible for freeing it. Switched to ForeignPtr to automate this.
2014-04-10 15:21:07 +02:00
Johan Tibell
64e6ba1259 Improve scalability of counters a lot
Counters now scale orders of magnitudes better as the number of
writers to the same counter increases. Here's the results on our
current benchmark on a 6 core machine:

        cores
            1       6
before  1.87s  81.09s
after   0.11s   0.32s

Note how the very heavy contention gives a slowdown rather than a
speedup as the number of cores increases, but the new implementation
slows down much less than the old one and is also generally faster.
2014-04-08 17:25:58 +02:00
Johan Tibell
2a77b569c5 Mention that counters are non-negative 2011-12-31 18:39:14 -08:00
Johan Tibell
ac517faa31 Minor doc tweak 2011-12-31 18:29:41 -08:00
Johan Tibell
3cf252ee96 Improve counter and gauge documentation 2011-12-30 22:37:36 -08:00
Johan Tibell
b195b1c48e Add Counter.modify 2011-12-30 10:13:43 -08:00
Johan Tibell
b744192565 More documentation tweaks 2011-12-29 16:04:57 -08:00
Johan Tibell
4fac77639d A bunch of documentation improvements 2011-12-29 15:08:59 -08:00
Johan Tibell
a85638ca5f Add user defined counters 2011-12-29 13:15:42 -08:00
Johan Tibell
bc42acf53c Add Counter module 2011-12-29 13:15:42 -08:00