mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-30 16:40:18 +00:00
Export metric summaries and adapt analysis scripts
This commit is contained in:
1 parent
6d0ae4f87c
commit
1b3ec922fa
9 files changed
+292
-26
No files matched your search
@@ -16,6 +16,24 @@ pub use units::{InformationUnit, IsUnit, TimeUnit};
|
||||
pub mod statistics;
|
||||
mod units;
|
||||
|
||||
pub trait QuantityInUnit<U> {
|
||||
fn value_in_unit(self) -> f64;
|
||||
}
|
||||
|
||||
impl<U: uom::si::time::Unit + uom::Conversion<f64, T = f64>> QuantityInUnit<U> for Time {
|
||||
fn value_in_unit(self) -> f64 {
|
||||
self.get::<U>()
|
||||
}
|
||||
}
|
||||
|
||||
impl<U: uom::si::information::Unit + uom::Conversion<f64, T = f64>> QuantityInUnit<U>
|
||||
for Information
|
||||
{
|
||||
fn value_in_unit(self) -> f64 {
|
||||
self.get::<U>()
|
||||
}
|
||||
}
|
||||
|
||||
pub trait FormatQuantity {
|
||||
type Unit;
|
||||
|
||||
|
||||
Reference in new issue
Block a user