- Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathhotrestart_main.cc
20 lines (18 loc) · 859 Bytes
/
hotrestart_main.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include"source/common/stats/utility.h"
#include"source/exe/main_common.h"
// NOLINT(namespace-envoy)
/**
* Custom main() for hotrestart_test. This should be identical to
* source/exe/main.cc, except for the registration and increment of a new gauge
* specifically for hot_restart.test.sh.
*/
intmain(int argc, char** argv) {
returnEnvoy::MainCommon::main(argc, argv, [](Envoy::Server::Instance& server) {
// Creates a gauge that will be incremented once and then never touched. This is
// for testing parent-gauge accumulation in hot_restart_test.sh.
Envoy::Stats::Utility::gaugeFromElements(*server.stats().rootScope(),
{Envoy::Stats::DynamicName("hotrestart_test_gauge")},
Envoy::Stats::Gauge::ImportMode::Accumulate)
.inc();
});
}