minstant
A drop-in replacement for std::time::Instant that measures time with high performance and high accuracy powered by TSC.
Usage
[]
= "0.1.2"
let start = now;
// Code snipppet to measure
let duration: Duration = start.elapsed;
Motivation
This library is used by a high performance tracing library minitrace-rust. The main purpose is to use TSC on x86 processors to measure time at high speed without losing much accuracy.
Platform Support
Currently, only the Linux on x86 or x86_64 is backed by TSC. On other platforms, minstant falls back to coarse time. If TSC is unstable, it will also fall back to coarse time.
Benchmark
Benchmark platform is Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz on CentOS 7.
> cargo
