aboutsummaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/metrics.h
blob: 87072410ef0ee56a0c0efddfc549fa20c76a7ecb (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 2017 Yahoo Holdings. 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