Skip to content

Commit 3ebbfc6

Browse files
committed
Introduce Endpoint#seconds_{reading,processing}_messages for the API
1 parent ecea525 commit 3ebbfc6

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

lib/base/benchmark.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Benchmark
2525
* @return The total accumulated time in seconds
2626
*/
2727
template<class T>
28-
explicit operator T() const noexcept
28+
operator T() const noexcept
2929
{
3030
return std::chrono::duration<T>(Clock::duration(m_Sum.load(std::memory_order_relaxed))).count();
3131
}

lib/remote/endpoint.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,13 @@ double Endpoint::GetBytesReceivedPerSecond() const
136136
{
137137
return m_BytesReceived.CalculateRate(Utility::GetTime(), 60);
138138
}
139+
140+
double Endpoint::GetSecondsReadingMessages() const
141+
{
142+
return m_InputReadTime;
143+
}
144+
145+
double Endpoint::GetSecondsProcessingMessages() const
146+
{
147+
return m_InputProcessTime;
148+
}

lib/remote/endpoint.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class Endpoint final : public ObjectImpl<Endpoint>
5757
double GetBytesSentPerSecond() const override;
5858
double GetBytesReceivedPerSecond() const override;
5959

60+
double GetSecondsReadingMessages() const override;
61+
double GetSecondsProcessingMessages() const override;
62+
6063
protected:
6164
void OnAllConfigLoaded() override;
6265

lib/remote/endpoint.ti

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ class Endpoint : ConfigObject
5454
[no_user_modify, no_storage] double bytes_received_per_second {
5555
get;
5656
};
57+
58+
[no_user_modify, no_storage] double seconds_reading_messages {
59+
get;
60+
};
61+
62+
[no_user_modify, no_storage] double seconds_processing_messages {
63+
get;
64+
};
5765
};
5866

5967
}

0 commit comments

Comments
 (0)