Home | History | Annotate | Download | only in benchmarks

Lines Matching refs:state

121 static void ipv4_loopback(benchmark::State& state, const bool waitBetweenRuns) {
125 state.SkipWithError("Unable to bind server socket");
130 std::vector<uint64_t> latencies(state.max_iterations);
133 while (state.KeepRunning()) {
136 state.SkipWithError(StringPrintf("socket() failed with errno=%d", errno).c_str());
144 state.SkipWithError(StringPrintf("connect() failed with errno=%d", errno).c_str());
151 state.SetIterationTime(latencies[iterations] / 1e9L);
160 state.SkipWithError(StringPrintf("accept() failed with errno=%d", errno).c_str());
174 state.SetLabel(StringPrintf("%lld", (long long) latencies[iterations * 9 / 10]));
178 static void ipv6_loopback(benchmark::State& state, const bool waitBetweenRuns) {
182 state.SkipWithError("Unable to bind server socket");
187 std::vector<uint64_t> latencies(state.max_iterations);
190 while (state.KeepRunning()) {
193 state.SkipWithError(StringPrintf("socket() failed with errno=%d", errno).c_str());
201 state.SkipWithError(StringPrintf("connect() failed with errno=%d", errno).c_str());
208 state.SetIterationTime(latencies[iterations] / 1e9L);
217 state.SkipWithError(StringPrintf("accept() failed with errno=%d", errno).c_str());
231 state.SetLabel(StringPrintf("%lld", (long long) latencies[iterations * 9 / 10]));
236 ::benchmark::State& state, const int reportingLevel,
239 const bool isMaster = (state.thread_index == 0);
272 benchmarkFunction(state, waitBetweenRuns);
290 static void ipv4_metrics_reporting_no_fwmark(::benchmark::State& state) {
291 run_at_reporting_level(ipv4_loopback, state, INetdEventListener::REPORTING_LEVEL_NONE, true);
296 static void ipv4_metrics_reporting_no_load(::benchmark::State& state) {
297 run_at_reporting_level(ipv4_loopback, state, INetdEventListener::REPORTING_LEVEL_METRICS, true);
301 static void ipv4_full_reporting_no_load(::benchmark::State& state) {
302 run_at_reporting_level(ipv4_loopback, state, INetdEventListener::REPORTING_LEVEL_FULL, true);
307 static void ipv4_metrics_reporting_high_load(::benchmark::State& state) {
308 run_at_reporting_level(ipv4_loopback, state, INetdEventListener::REPORTING_LEVEL_METRICS,
314 static void ipv4_full_reporting_high_load(::benchmark::State& state) {
315 run_at_reporting_level(ipv4_loopback, state, INetdEventListener::REPORTING_LEVEL_FULL, false);
321 static void ipv6_metrics_reporting_no_fwmark(::benchmark::State& state) {
322 run_at_reporting_level(ipv6_loopback, state, INetdEventListener::REPORTING_LEVEL_NONE, true);
327 static void ipv6_metrics_reporting_no_load(::benchmark::State& state) {
328 run_at_reporting_level(ipv6_loopback, state, INetdEventListener::REPORTING_LEVEL_METRICS, true);
332 static void ipv6_full_reporting_no_load(::benchmark::State& state) {
333 run_at_reporting_level(ipv6_loopback, state, INetdEventListener::REPORTING_LEVEL_FULL, true);
338 static void ipv6_metrics_reporting_high_load(::benchmark::State& state) {
339 run_at_reporting_level(ipv6_loopback, state, INetdEventListener::REPORTING_LEVEL_METRICS,
345 static void ipv6_full_reporting_high_load(::benchmark::State& state) {
346 run_at_reporting_level(ipv6_loopback, state, INetdEventListener::REPORTING_LEVEL_FULL, false);