swift-metrics/Sources
tomer doron 708b960b46
Add microseconds to TimeUnit (#64)
Motivation:
I have a metrics backend where I need to store timer values in
microseconds. The "preferred display unit" models this exactly, but it
seems to have (inadvertently?) omitted the possibility to express
microseconds. Note that among the timer "report" methods there is
already a microseconds option.

Changes:
* change TimeUnit from enum to struct with static members to support non-api breaking future evolution 
* add scaleFromNanoseconds to TimeUnit to make it easy to compute the values without switching over
* add tests

Co-authored-by: Chris Burrows <cburrows@gmail.com>
2020-03-03 17:51:39 -08:00
..
CoreMetrics Add microseconds to TimeUnit (#64) 2020-03-03 17:51:39 -08:00
Metrics Update Timer.measure() to use DispatchTime instead of Date 2019-11-11 09:39:33 +09:00