summaryrefslogtreecommitdiff
path: root/src/result.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/result.rs')
-rw-r--r--src/result.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/result.rs b/src/result.rs
index 4a0277e..22a49a0 100644
--- a/src/result.rs
+++ b/src/result.rs
@@ -67,13 +67,21 @@ impl SuiteMeasurements {
measurements: vec![],
obnam_version,
obnam_benchmark_version: render_testament!(TESTAMENT),
- benchmark_started: Utc::now().to_string(),
+ benchmark_started: Utc::now().format("%Y-%m-%dT%H%M%S").to_string(),
hostname: hostname.to_string(),
host_ram: mem.mem_total,
host_cpus: cpu.num_cores(),
})
}
+ pub fn hostname(&self) -> &str {
+ &self.hostname
+ }
+
+ pub fn timestamp(&self) -> &str {
+ &self.benchmark_started
+ }
+
pub fn push(&mut self, m: OpMeasurements) {
self.measurements.push(m);
}