summaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/metrics.h
blob: 709ee9103d999028a60c1c0915a3dfc93e51f805 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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