11#ifndef O2_FRAMEWORK_DATAPROCESSINGSTATES_H_
12#define O2_FRAMEWORK_DATAPROCESSINGSTATES_H_
81 char const*
data =
nullptr;
136 std::string_view
state(int64_t
id)
const
140 return std::string_view(
statesBuffer.data() + view.first, view.size);
149 void flushChangedStates(std::function<
void(std::string
const&, int64_t, std::string_view)>
const& callback);
156 std::array<char, STATES_BUFFER_SIZE>
store = {};
struct uv_loop_s uv_loop_t
GLuint const GLchar * name
GLenum GLenum GLsizei const GLuint GLboolean enabled
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
Defining PrimaryVertex explicitly as messageable.
ServiceKind
The kind of service we are asking for.
ProcessingStateId
Helper struct to define some known states.
int64_t minPublishInterval
How many milliseconds must have passed since the last publishing.
uint64_t maxRefreshLatency
short capacity
Extra capacity for the state.
int64_t lastFlushedToRemote
std::string_view state(int64_t id) const
std::array< StateView, MAX_STATES > statesViews
The views for all the states, indexed by the state id.
static constexpr int STATES_BUFFER_SIZE
static constexpr ServiceKind service_kind
int64_t pushedMetricsLapse
int64_t publishingInvokedTotal
void processCommandQueue()
std::vector< short > registeredStates
std::array< StateSpec, MAX_STATES > stateSpecs
std::array< std::string, MAX_STATES > stateNames
DataProcessingStates(DataProcessingStates const &other)
int64_t publishedMetricsLapse
std::function< int64_t(int64_t base, int64_t offset)> getTimestamp
std::atomic< int > nextState
void updateState(CommandSpec state)
std::atomic< int64_t > updatedMetricsLapse
std::array< char, STATES_BUFFER_SIZE > store
std::atomic< int > pendingStates
void registerState(StateSpec const &spec)
std::array< bool, MAX_STATES > updated
int64_t pushedMetricsTotal
int64_t initialTimeOffset
static constexpr int MAX_STATES
std::atomic< int > lastInsertedState
std::atomic< int64_t > generation
void flushChangedStates(std::function< void(std::string const &, int64_t, std::string_view)> const &callback)
std::function< void(int64_t &base, int64_t &offset)> getRealtimeBase
int64_t updatedMetricsTotal
int64_t publishingDoneTotal
std::atomic< size_t > statesSize
std::vector< char > statesBuffer
The buffer were we store the state before flushing it.
std::array< UpdateInfo, MAX_STATES > updateInfos
int64_t publishedMetricsTotal
static std::function< int64_t(int64_t base, int64_t offset)> defaultCPUTimeConfigurator()
static std::function< void(int64_t &base, int64_t &offset)> defaultRealtimeBaseConfigurator(uint64_t offset, uv_loop_t *loop)
VectorOfTObjectPtrs other