mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 23:50:28 -06:00
110 lines
2.3 KiB
Plaintext
110 lines
2.3 KiB
Plaintext
@startuml
|
|
title: Metrics Types and Scopes in SyncAction
|
|
|
|
Participant Input as i
|
|
Participant Thread as t
|
|
Participant Action as a
|
|
Participant Activity as at
|
|
Participant "Native\nDriver" as d
|
|
|
|
== acquire input ==
|
|
|
|
group TIMER read-input
|
|
t -> i : get segment(stride)
|
|
activate i
|
|
t <- i : <cycle segment>[stride]
|
|
deactivate i
|
|
end
|
|
|
|
group BLOCK striderate
|
|
t -> t: block until\nunthrottled
|
|
end
|
|
|
|
group TIMER strides
|
|
|
|
loop over cycle values in segment
|
|
|
|
group BLOCK cyclerate
|
|
t -> t: block until\nunthrottled
|
|
end
|
|
|
|
group TIMER cycle
|
|
t -> a : runCycle(cycle)
|
|
activate a
|
|
|
|
group TIMER bind
|
|
a -> at: bind
|
|
activate at
|
|
|
|
at -> d: ... [if needed]
|
|
at <- d: ...
|
|
a <- at: op
|
|
deactivate at
|
|
end
|
|
|
|
group HISTOGRAM tries
|
|
loop over tries
|
|
== for blocking APIs ==
|
|
|
|
group TIMERS\nexecute\nresult\nresult-success[result-success\nwhen no error]
|
|
a -> d: execute
|
|
activate d
|
|
a <- d: result
|
|
deactivate d
|
|
end
|
|
note right
|
|
When the underlying native
|
|
driver does not expose an async
|
|
API, execute and result must be updated
|
|
with the same measurements.
|
|
|
|
result-success contains the
|
|
same measurements as result,
|
|
but ONLY for non-exceptional
|
|
native driver results.
|
|
end note
|
|
|
|
|
|
== for async APIs ==
|
|
|
|
group TIMER execute
|
|
a -> d: execute
|
|
activate d
|
|
d -> future **: create
|
|
a <- d: future
|
|
deactivate d
|
|
end
|
|
|
|
note right
|
|
When the underlying native
|
|
driver DOES expose an async
|
|
API, execute measures
|
|
submission of an op to the
|
|
native driver, while result
|
|
measures the completion
|
|
of the op.
|
|
|
|
result-success contains the
|
|
same measurements as result,
|
|
but ONLY for non-exceptional
|
|
native driver results.
|
|
end note
|
|
|
|
group TIMERS\nresult\nresult-success[result-success\nwhen no error]
|
|
a -> future: get
|
|
activate future
|
|
a <- future: result
|
|
deactivate future
|
|
end
|
|
|
|
end
|
|
|
|
t <- a : result
|
|
deactivate a
|
|
end
|
|
end
|
|
end
|
|
end # strides
|
|
|
|
@enduml
|