Commit Graph

180 Commits

Author SHA1 Message Date
jean-airoldie c30f256fb2 Improved gauge, timing and value macro doc (#46) 2019-08-13 21:08:37 -04:00
jean-airoldie 634cf4e261 Improved counter! macro doc (#44) 2019-08-13 18:24:52 -04:00
jean-airoldie 714fcaeed6 Make the available recorders more obvious (#45) 2019-08-13 18:24:38 -04:00
Toby Lawrence c43606b9ac
(cargo-release) version 0.11.1 2019-08-09 14:20:42 -04:00
Toby Lawrence b7153b4ea1
Update the changelog for metrics. 2019-08-09 14:20:13 -04:00
Toby Lawrence cf29d69a1e
Also fix fully qualified paths to the timing macro. 2019-08-09 14:17:07 -04:00
Toby Lawrence e3cd2ada68
Remove and fix metric-core CHANGELOG; cargo-release did not do the right thing. :) 2019-08-08 19:49:12 -04:00
Toby Lawrence 29039ffbb2
(cargo-release) version 0.5.1 2019-08-08 19:47:07 -04:00
Toby Lawrence 33f8bed0e8 Update our cargo-release config to make things a little more streamlined. 2019-08-08 19:46:41 -04:00
Toby Lawrence be36b0e75f
Update the correct CHANGELOG, doh! :) 2019-08-08 19:27:36 -04:00
svartalf 0ab3543a2d Use absolute macro path for labels! invocation (#43)
* Use absolute macro path for labels! invocation
2019-08-08 19:23:48 -04:00
Toby Lawrence f2b6cc1f21
(cargo-release) version 0.1.1 2019-07-30 18:17:32 -04:00
Toby Lawrence 59ea5fa6d0
misc: set up cargo-release config 2019-07-30 18:16:49 -04:00
Toby Lawrence f74948ba9f
(cargo-release) version 0.1.1 2019-07-30 18:08:10 -04:00
Toby Lawrence b3f34f022e
(cargo-release) version 0.1.1 2019-07-30 18:07:11 -04:00
Toby Lawrence 6566647a06
Stop pulling in unnecessary features/dependencies. 2019-07-30 17:49:01 -04:00
Toby Lawrence b2e87d7a7f
Release preparation. (meta) (#41)
* Cut new releases for all modified crates.
2019-07-30 17:08:19 -04:00
Toby Lawrence 6ca2bcf097
runtime: add proxy metric support (#39) 2019-07-28 20:10:56 -04:00
samrg472 6af1c97186 Add project layout information to the README (#40) 2019-07-25 09:17:35 -04:00
Toby Lawrence ed80f3307e
feature: add a JSON observer (#38) 2019-07-23 12:25:49 -04:00
Toby Lawrence 66ba3056a7
runtime: small code simplification 2019-07-21 11:52:57 -04:00
jean-airoldie e614847de6 core: Recorder -> Observer (#35) 2019-07-17 09:06:45 -04:00
Toby Lawrence ad72bc16c1
core: add Builder trait for recorders (#30)
This change adds a new trait -- `Builder` -- which defines a value that
can create new recorder instances.

As we have a need to generate owned recorders, in particular for
futures-based code, the `Builder` trait provides a way to do so without
any jankiness, such as the prior Clone-based approach.

As such, all exporters now expect a builder to be passed in, rather than
the recorder itself.
2019-07-15 09:35:34 -04:00
Toby Lawrence 8c4e130170
runtime: remove needless build profile. (#32) 2019-07-07 14:51:59 -04:00
Toby Lawrence d459db8084
Add label support + rename crates. (#27) 2019-07-05 21:14:08 -04:00
Denis Andrejew d33d54f0ac fix typo in README.md (#28) 2019-07-02 10:28:11 -04:00
Toby Lawrence 317862af67
metrics: fix broken doctest 2019-06-11 22:31:34 -04:00
Toby Lawrence bff9ae069f
metrics-facade: bump to 0.1.1 2019-06-11 22:15:53 -04:00
Toby Lawrence 94785a8765
metrics: bump to 0.10.2 2019-06-11 21:47:26 -04:00
Toby Lawrence fc5d487520
metrics: fix a lil docs glitch 2019-06-11 21:45:04 -04:00
Toby Lawrence 35b4db8cbf
metrics: update docs for facade usage 2019-06-11 21:38:05 -04:00
Toby Lawrence 8cb8a8cf93
metrics-facade: update COPYRIGHT and README 2019-06-11 18:06:42 -04:00
Toby Lawrence 1de4343fc5
Add metrics-facade crate to provide global macros. (#20)
Add support for a `log`-esque crate that can provide globally-installed metrics collection and ingest via basic macros.
2019-06-11 11:54:27 -04:00
Toby Lawrence 2046be737d
Merge pull request #13 from metrics-rs/refactor/event-loopless
Entirely remove the event loop and switch to pure atomics.
2019-06-04 18:01:16 -04:00
Toby Lawrence 357af843d2
Add `Debug` to `Configuration`. 2019-06-04 17:31:34 -04:00
Toby Lawrence 21f2b937c3
Update tests and make sure we don't double clear the new bucket. 2019-06-04 16:29:36 -04:00
Toby Lawrence 275be9ddf0
Rework upkeep in AtomicWindowedHistogram.
We've reworked upkeep a bit to avoid any datapoint loss during upkeep,
and to make it a bit easier to grok and follow along with.  We also
added a better "gauntlet" test to atempt to hit with with multiple
writers and eke out any glaring issues, as well as a bench test for it.
2019-06-03 17:13:42 -04:00
Toby Lawrence 0a3e8bbff6
Fix up all the review nits. 2019-06-01 15:55:28 -04:00
Toby Lawrence f14d645cfb Add CI via Azure Pipelines to actually run all our new tests. 2019-05-29 23:07:14 -04:00
Toby Lawrence 1559dd4fc6 Need to uptick the version of metrics. 2019-05-29 23:07:14 -04:00
Toby Lawrence 9f1bcb5226 Entirely remove the event loop and switch to pure atomics.
Originally, metrics (and `hotmic` before it was converted) was based on
an event loop that centered around `mio`'s `Poll` interface with a
custom channel to read and write metrics to.  That model required a
dedicated thread to run to poll for writes, and ingest them, managing
the internal data structures in turn.

Eventually, I rewrote that portion to be based on `crossbeam-channel`
but we still depended on a background thread to pop samples off the
channel and process them.

Instead, we've rewritten the core of metrics to be based purely on
atomics, with the caveat that we still do have a background thread.

Instead of a single channel that metrics are funneled into, each
underlying metric becomes a single-track codepath: each metric is backed
by an atomic structure which means we can pass handles to that storage
as far as the callers themselves, eliminating the need to funnel metrics
into the "core" where they all contend for processing.

Counters are gauges are now, effectively, wrapped atomic integers, which
means we can process over 100 million counter/gauge updates per core.
Histograms are based on a brand-new atomic "bucket" that allows for
fast, unbounded writes and the ability to snapshot at any time.

The end result is that we can process a mixed workload (counter, gauge,
and histogram) at sample rates of up to 30 million samples per second
per core, with p999 ingest latencies of in the low hundreds of
nanoseconds.  Taking snapshots also now avoids stalling the event loop
and driving up tail latencies for ingest, and writers can proceed with
no interruption.

There is still a background thread that is part of quanta's new "recent"
time support, which allows a background thread to incrementally update a
shared global time, which can be accessed more quickly than grabbing the
time directly.  For our purposes, only histograms need the time to
perform the window upkeep inherent to the sliding windows we use, and
the time they need can be far less precise than what quanta is capable
of.  This background thread is spawned automatically when creating a
receiver, and drops when the receiver goes away.  By default, it updates
20 times a second performing an operation which itself takes less than
100ns, so all in all, this background thread should be imperceptible,
performance-wise, on all systems*.

On top of all of this, we've embraced the natural pattern of defining
metrics individually at the variable/field level, and added supported
for proxy types, which can be acquired from a sink and embedded as
  fields within your existing types, which lets you directly update
  metrics with the ease of accessing a field in an object.  Sinks still
  have the ability to have metrics pushed directly into them, but this
  just opens up more possibilities.

* - famous last words
2019-05-29 23:07:14 -04:00
Toby Lawrence ebe5d9266b Update exporters/recorders to use new metrics-util. 2019-05-29 23:07:14 -04:00
Toby Lawrence 29eb316438 Major additions to metrics-util + formatting/documentation polish.
We've added two new major types to the crate:
- AtomicBucket, which allows queue-style atomic writes with atomic
snapshots, powered by crossbeam-epoch
- StreamingIntegers, a scalar delta/zigzag/variable-byte integer
compression implementation

These types are a major part of reworking metrics to be event loop-less
and may be eventually be spun out into their own standalone crates, and
they have value outside of just metrics.

We've also really leveled up our documentation and benchmarks, and these
two types now have full benchmark suites to better demonstrate their
value and their performance on a given system.
2019-05-29 23:07:14 -04:00
Toby Lawrence 3a0aceab68
Copy workspace README to the metrics crate. 2019-05-29 18:42:19 -04:00
Toby Lawrence a0ec2923f3
Merge pull request #17 from metrics-rs/readme-redo
Update our README.
2019-05-29 12:31:14 -04:00
Toby Lawrence 0040a1304b
First pass at an updated README. 2019-05-28 23:25:08 -04:00
Toby Lawrence 52ade1201b
bump metrics-exporters-http to 0.1.0 2019-05-05 20:43:19 -04:00
Toby Lawrence 5ff6ec980e
initial import of metrics-exporter-http v0.1.0 2019-05-05 20:42:46 -04:00
Toby Lawrence 75a38b7bd8
Drop copyright bit from LICENSE because it duplicates COPYRIGHT. 2019-05-01 13:51:18 -04:00
Toby Lawrence cd03b1e613
Bump metrics to 0.9.1 2019-05-01 11:47:17 -04:00