diff options
Diffstat (limited to 'storage/src/vespa/storageframework/generic/thread/thread.h')
-rw-r--r-- | storage/src/vespa/storageframework/generic/thread/thread.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/storage/src/vespa/storageframework/generic/thread/thread.h b/storage/src/vespa/storageframework/generic/thread/thread.h index c17638a0d42..444376b87a5 100644 --- a/storage/src/vespa/storageframework/generic/thread/thread.h +++ b/storage/src/vespa/storageframework/generic/thread/thread.h @@ -13,10 +13,19 @@ #pragma once #include "runnable.h" +#include "thread_properties.h" #include <condition_variable> namespace storage::framework { +/** Data kept on each thread due to the registerTick functionality. */ +struct ThreadTickData { + CycleType _lastTickType; + vespalib::steady_time _lastTick; + vespalib::duration _maxProcessingTimeSeen; + vespalib::duration _maxWaitTimeSeen; +}; + class Thread : public ThreadHandle { vespalib::string _id; @@ -45,6 +54,11 @@ public: */ virtual void join() = 0; + virtual ThreadTickData getTickData() const = 0; + virtual const ThreadProperties& getProperties() const = 0; + + virtual vespalib::string get_live_thread_stack_trace() const = 0; + /** * Utility function to interrupt and join a thread, possibly broadcasting * through a monitor after the signalling face. |