aboutsummaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/metrics.h
diff options
context:
space:
mode:
Diffstat (limited to 'configd/src/apps/sentinel/metrics.h')
-rw-r--r--configd/src/apps/sentinel/metrics.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/configd/src/apps/sentinel/metrics.h b/configd/src/apps/sentinel/metrics.h
new file mode 100644
index 00000000000..709ee9103d9
--- /dev/null
+++ b/configd/src/apps/sentinel/metrics.h
@@ -0,0 +1,28 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#pragma once
+
+#include <sys/time.h>
+
+namespace config {
+namespace sentinel {
+
+struct StartMetrics {
+ unsigned long currentlyRunningServices;
+ unsigned long totalRestartsCounter;
+ unsigned long totalRestartsLastPeriod;
+ long lastLoggedTime;
+ unsigned long totalRestartsLastSnapshot;
+ long snapshotStart;
+ long snapshotEnd;
+ long startedTime;
+
+ StartMetrics();
+
+ void output();
+ void reset(unsigned long curTime);
+ void maybeLog();
+};
+
+} // end namespace config::sentinel
+} // end namespace config
+