2020-10-23 02:34:47 -05:00
|
|
|
# Annotations
|
|
|
|
|
|
|
|
NOTE: Here, annotations are notes that are stored in a metrics system for
|
|
|
|
review, not _Java Annotations_.
|
|
|
|
|
|
|
|
The annotations support in nosqlbench is meant to allow for automatic
|
2020-12-17 17:08:24 -06:00
|
|
|
annotation of important timestamps and qualifying details for a nosqlbench
|
|
|
|
scenario.
|
2020-10-23 02:34:47 -05:00
|
|
|
|
|
|
|
# Annotation Semantics
|
|
|
|
|
|
|
|
Annotations are treated generally like events which mark a boundary
|
2020-12-17 17:08:24 -06:00
|
|
|
between test scenario states in nosqlbench.
|
|
|
|
|
|
|
|
Annotations always describe at least one instant in time, and possibly
|
|
|
|
two. When two instants are connected together with an annotation, then the
|
|
|
|
annotation describes the lifetime that is bounded by two events:
|
|
|
|
the beginning and the end. Annotations which describe an instant in time
|
|
|
|
are tagged as "span: instant", and those which are connected with two
|
|
|
|
different instants are tagged as "span: interval".
|
|
|
|
|
|
|
|
When instrumenting an event for annotation, both positive and negative
|
|
|
|
outcomes must be instrumented. That is, if a user is expecting an
|
|
|
|
annotation marker for when an activity was started, they should instead
|
|
|
|
see an error annotation if there indeed was an error. The successful
|
|
|
|
outcome of starting an activity is a different event than the failure of
|
|
|
|
it, but they both speak to the outcome of trying to start an activity.
|
2020-10-23 02:34:47 -05:00
|
|
|
|
2020-11-16 17:35:04 -06:00
|
|
|
# NoSQLBench Annotation Level
|
2020-10-23 02:34:47 -05:00
|
|
|
|
2020-11-16 17:35:04 -06:00
|
|
|
Each annotation comes from a particular level of execution with
|
2020-12-17 17:08:24 -06:00
|
|
|
NoSQLBench. Starting from the top, each layer is nested within the last.
|
|
|
|
The conceptual view of this would appear as:
|
2020-11-16 17:35:04 -06:00
|
|
|
|
|
|
|
+--------+
|
|
|
|
| op |
|
2022-06-16 15:13:17 -05:00
|
|
|
+------------+
|
2020-11-16 17:35:04 -06:00
|
|
|
| motor |
|
2022-06-16 15:13:17 -05:00
|
|
|
+-----------------+
|
2020-11-16 17:35:04 -06:00
|
|
|
| activity |
|
2022-06-16 15:13:17 -05:00
|
|
|
+---------------------+
|
2020-11-16 17:35:04 -06:00
|
|
|
| scripting |
|
|
|
|
+-------------------------+ +---------------+
|
|
|
|
| scenario | | application |
|
|
|
|
+-------------------------------------------------+
|
|
|
|
| CLI ( Command Line Interface ) |
|
|
|
|
+-------------------------------------------------+
|
2020-12-17 17:08:24 -06:00
|
|
|
|
2020-11-16 17:35:04 -06:00
|
|
|
That is, every op happens within a thread motor, every thread motor
|
2020-12-17 17:08:24 -06:00
|
|
|
happens within an activity, and so on.
|
|
|
|
|
2020-10-23 02:34:47 -05:00
|
|
|
- cli
|
2020-11-16 17:35:04 -06:00
|
|
|
- cli.render - When the CLI renders a scenario script
|
|
|
|
- cli.execution - When the CLI executes a scenario
|
|
|
|
- cli.error - When there is an error at the CLI level
|
2020-10-23 02:34:47 -05:00
|
|
|
- scenario
|
2020-11-16 17:35:04 -06:00
|
|
|
- scenario.params - When a scenario is configured with parameters
|
|
|
|
- scenario.start - When a scenario is started
|
|
|
|
- scenario.stop - When a scenario is stopped
|
|
|
|
- scenario.error - When a scenario throws an error
|
|
|
|
- scripting
|
|
|
|
- extensions - When an extension service object is created
|
2020-10-23 02:34:47 -05:00
|
|
|
- activity
|
2020-11-16 17:35:04 -06:00
|
|
|
- activity.params - When params are initially set or changed
|
|
|
|
- activity.start - Immediately before an activity is started
|
|
|
|
- activity.stop - When an activity is stopped
|
|
|
|
- activity.error - When an activity throws an error
|
|
|
|
- motor
|
2020-12-17 17:08:24 -06:00
|
|
|
- thread.state - When a motor thread changes state
|
2020-11-16 17:35:04 -06:00
|
|
|
- thread.error - When a motor thread throws an error
|
2020-12-17 17:08:24 -06:00
|
|
|
- op -- There are no op-level events at this time
|
|
|
|
- application -- There are no application-level events at this time
|
2020-10-23 02:34:47 -05:00
|
|
|
|
2022-06-16 15:13:17 -05:00
|
|
|
## Annotation Contents
|
2020-10-23 02:34:47 -05:00
|
|
|
|
2022-06-16 15:13:17 -05:00
|
|
|
### labels
|
|
|
|
|
|
|
|
Labels identify the event for the purposes of filtering in views
|
|
|
|
and analysis. These standard labels should be added to every annotation emitted by
|
2020-12-17 17:08:24 -06:00
|
|
|
NoSQLBench:
|
|
|
|
|
2022-06-16 15:13:17 -05:00
|
|
|
appname
|
|
|
|
: "nosqlbench"
|
|
|
|
|
|
|
|
session
|
|
|
|
: the NoSQLBench session ID
|
|
|
|
|
|
|
|
layer
|
|
|
|
: one of the core layers as above
|
|
|
|
|
|
|
|
event
|
|
|
|
: The name of the event within the layer as shown above
|
2020-11-16 17:35:04 -06:00
|
|
|
|
2020-10-23 02:34:47 -05:00
|
|
|
layer
|
|
|
|
: (user, cli, scenario, activity, thread, op)
|
2022-06-16 15:13:17 -05:00
|
|
|
|
2020-10-23 02:34:47 -05:00
|
|
|
span
|
|
|
|
: (instant, interval)
|
2022-06-16 15:13:17 -05:00
|
|
|
|
2020-10-23 02:34:47 -05:00
|
|
|
status
|
|
|
|
: (ok,error)
|
|
|
|
|
2022-06-16 15:13:17 -05:00
|
|
|
### details
|
|
|
|
|
|
|
|
Details is a map of properties which are canonical for the type of
|
|
|
|
annotation being recorded, but which are not used for naming or lookup.
|
|
|
|
At least one detail property should be added for each annotation. You could
|
|
|
|
say that the labels identify the canonical type of annotation, while the details
|
|
|
|
provide contextual information that makes the event described by the annotation
|
|
|
|
unique within that type.
|
|
|
|
|
|
|
|
All labels are considered details, and are packaged and represented for display
|
|
|
|
anywhere details would be.
|
|
|
|
|
|
|
|
## Annotation Implementations
|
2020-10-23 02:34:47 -05:00
|
|
|
|
2023-09-28 14:30:18 -05:00
|
|
|
NoSQLBench comes with a built-in annotation implementations, the logging annotator,
|
|
|
|
which is configured automatically.
|
2020-10-23 02:34:47 -05:00
|
|
|
|