diff --git a/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBBaseComponent.java b/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBBaseComponent.java index 7d898f112..c8e978394 100644 --- a/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBBaseComponent.java +++ b/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBBaseComponent.java @@ -38,7 +38,7 @@ public class NBBaseComponent extends NBBaseComponentMetrics implements NBCompone protected boolean bufferOrphanedMetrics = false; private ConcurrentHashMap props = new ConcurrentHashMap<>(); protected Exception error; - protected long started_ns, teardown_ns, closed_ns, errored_ns; + protected long started_ns, teardown_ns, closed_ns, errored_ns, started_epoch_ms; protected NBInvokableState state = NBInvokableState.STARTING; public NBBaseComponent(NBComponent parentComponent) { @@ -47,6 +47,7 @@ public class NBBaseComponent extends NBBaseComponentMetrics implements NBCompone public NBBaseComponent(NBComponent parentComponent, NBLabels componentSpecificLabelsOnly) { this.started_ns = System.nanoTime(); + this.started_epoch_ms = System.currentTimeMillis(); this.labels = componentSpecificLabelsOnly; if (parentComponent != null) { parent = parentComponent; @@ -296,4 +297,9 @@ public class NBBaseComponent extends NBBaseComponentMetrics implements NBCompone public long nanosof_error() { return this.errored_ns; } + + @Override + public long started_epoch_ms() { + return this.started_epoch_ms; + } } diff --git a/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBComponentTimeline.java b/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBComponentTimeline.java index 68241b939..7dabcde51 100644 --- a/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBComponentTimeline.java +++ b/nb-api/src/main/java/io/nosqlbench/nb/api/components/core/NBComponentTimeline.java @@ -47,4 +47,6 @@ public interface NBComponentTimeline { * @return nanosecond time of the error */ long nanosof_error(); + + long started_epoch_ms(); }