Package io.nosqlbench.api.annotations
Interface Annotation
- All Known Implementing Classes:
MutableAnnotation
public interface Annotation
This is a general purpose representation of an event that describes
a significant workflow detail to users running tests. It can be
an event that describes an instant, or it can describe an interval
in time (being associated with the interval of time between two
canonical events.)
This view of an annotation event captures the semantics of what
any reportable annotation should look like from the perspective of
NoSQLBench. It is up to the downstream consumers to map these
to concrete fields or identifiers as appropriate.
-
Method Summary
Modifier and TypeMethodDescriptionasJson()The details are an ordered map of all the content that you would want the user to see.longgetEnd()If this is the same asgetStart(), then the annotation is for an instant in time.The labels which identify what this annotation pertains to.getLayer()Annotations must be associated with a processing layer in NoSQLBench.getSpan()This should returnSpan.intervalif the span of time is not an instant, andSpan.instant, otherwise.longgetStart()If this is the same asgetEnd(), then the annotation is for an instant in time.
-
Method Details
-
getSession
String getSession()- Returns:
- The named session that the annotation is associated with
-
getStart
long getStart()If this is the same asgetEnd(), then the annotation is for an instant in time.- Returns:
- The beginning of the interval of time that the annotation describes
-
getEnd
long getEnd()If this is the same asgetStart(), then the annotation is for an instant in time.- Returns:
- The end of the interval of time that the annotation describes
-
getLayer
Layer getLayer()Annotations must be associated with a processing layer in NoSQLBench. For more details on layers, seeLayer- Returns:
-
getLabels
The labels which identify what this annotation pertains to. The following labels should be provided for every annotation, when available:- appname: "nosqlbench"
- alias: The name of the activity alias, if available
- workload: The name of the workload file, if named scenarios are used
- scenario: The name of the named scenario, if named scenarios are used
- step: The name of the named scenario step, if named scenario are used
- usermode: "named_scenario" or "adhoc_activity"
- Returns:
- The labels map
-
getDetails
The details are an ordered map of all the content that you would want the user to see.- Returns:
- The details map
-
newBuilder
-
getSpan
Span getSpan()This should returnSpan.intervalif the span of time is not an instant, andSpan.instant, otherwise. -
asJson
String asJson()
-