Flutter Engine
The Flutter Engine
benchmarking
benchmarking.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_BENCHMARKING_BENCHMARKING_H_
6
#define FLUTTER_BENCHMARKING_BENCHMARKING_H_
7
8
#include "benchmark/benchmark.h"
9
10
namespace
benchmarking
{
11
12
class
ScopedPauseTiming
{
13
public
:
14
explicit
ScopedPauseTiming
(
::benchmark::State
&
state
,
bool
enabled =
true
)
15
: state_(
state
), enabled_(enabled) {
16
if
(enabled_) {
17
state_.PauseTiming();
18
}
19
}
20
~ScopedPauseTiming
() {
21
if
(enabled_) {
22
state_.ResumeTiming();
23
}
24
}
25
26
private
:
27
::benchmark::State
& state_;
28
const
bool
enabled_;
29
};
30
31
}
// namespace benchmarking
32
33
#endif
// FLUTTER_BENCHMARKING_BENCHMARKING_H_
benchmarking::ScopedPauseTiming
Definition:
benchmarking.h:12
benchmarking::ScopedPauseTiming::~ScopedPauseTiming
~ScopedPauseTiming()
Definition:
benchmarking.h:20
benchmarking::ScopedPauseTiming::ScopedPauseTiming
ScopedPauseTiming(::benchmark::State &state, bool enabled=true)
Definition:
benchmarking.h:14
state
AtkStateType state
Definition:
fl_accessible_node.cc:10
ax::mojom::State
State
Definition:
ax_enums.h:317
benchmarking
Definition:
benchmarking.cc:12
Generated on Sun Jun 23 2024 21:54:54 for Flutter Engine by
1.9.4