aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-09-22 23:59:56 +0200
committerGitHub <[email protected]>2022-09-22 23:59:56 +0200
commit050b61eee042dd23cfb8ad1744f876ec00932198 (patch)
treecad4dbc80b385efde67bd1df88108d9049c991e2 /zencore
parentAdd elapsed seconds per individual request from upstream (#167) (diff)
downloadzen-050b61eee042dd23cfb8ad1744f876ec00932198.tar.xz
zen-050b61eee042dd23cfb8ad1744f876ec00932198.zip
De/more upstream details (#168)v0.1.6-pre9v0.1.6-pre10
* Pass along endpoint info for each upstream request * Add more timing details in log * more log details for single item upstream fetch * DISABLEDQUERY over SKIP
Diffstat (limited to 'zencore')
-rw-r--r--zencore/include/zencore/stats.h1
-rw-r--r--zencore/stats.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/zencore/include/zencore/stats.h b/zencore/include/zencore/stats.h
index f0efc36d8..1a0817b99 100644
--- a/zencore/include/zencore/stats.h
+++ b/zencore/include/zencore/stats.h
@@ -209,6 +209,7 @@ public:
Scope(OperationTiming& Outer);
~Scope();
+ void Stop();
void Cancel();
private:
diff --git a/zencore/stats.cpp b/zencore/stats.cpp
index f783ccd3d..372bc42f8 100644
--- a/zencore/stats.cpp
+++ b/zencore/stats.cpp
@@ -416,9 +416,16 @@ OperationTiming::Scope::Scope(OperationTiming& Outer) : m_Outer(Outer), m_StartT
OperationTiming::Scope::~Scope()
{
+ Stop();
+}
+
+void
+OperationTiming::Scope::Stop()
+{
if (m_StartTick != 0)
{
m_Outer.Update(GetHifreqTimerValue() - m_StartTick);
+ m_StartTick = 0;
}
}