class OperationTracker
Defined at line 32 of file ../../src/storage/lib/watchdog/watchdog.h
Set of operation properties used by the watch dog to track the operation.
Each operation and operation type that needs to be tracked needs to implement
this class.
TODO(https://fxbug.dev/42135760)
Public Methods
OperationTrackerId GetId ()
Returns the operation's unique id across all tracked operations.
std::string_view Name ()
Returns the name of the operation. Used to print messages/logs.
std::chrono::nanoseconds Timeout ()
Returns operation specific timeout. An operation or set of operations can
override default timeout of the watchdog. This is useful when not all type
of operations take equal amount of time.
bool TimedOut ()
Returns true if the operation has timed out.
TimePoint StartTime ()
Returns operation start time.
void OnTimeOut (FILE * out_stream)
In addition to taking default action on operation timeout, OnTimeOut
gives the opportunity to the client to take custom action if needed.
OnTimeOut is called after default handler is called.