Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::BenchmarkIsolateScope Class Reference

#include <benchmark_test.h>

Public Member Functions

 BenchmarkIsolateScope (Benchmark *benchmark)
 
 ~BenchmarkIsolateScope ()
 
Benchmarkbenchmark () const
 

Detailed Description

Definition at line 107 of file benchmark_test.h.

Constructor & Destructor Documentation

◆ BenchmarkIsolateScope()

dart::BenchmarkIsolateScope::BenchmarkIsolateScope ( Benchmark benchmark)
inlineexplicit

Definition at line 109 of file benchmark_test.h.

109 : benchmark_(benchmark) {
110 benchmark->CreateIsolate();
111 Dart_EnterScope(); // Create a Dart API scope for unit benchmarks.
112 }
DART_EXPORT void Dart_EnterScope()

◆ ~BenchmarkIsolateScope()

dart::BenchmarkIsolateScope::~BenchmarkIsolateScope ( )
inline

Definition at line 113 of file benchmark_test.h.

113 {
114 Dart_ExitScope(); // Exit the Dart API scope created for unit tests.
115 ASSERT(benchmark_->isolate() == Isolate::Current());
117 benchmark_ = nullptr;
118 }
Isolate * isolate() const
static Isolate * Current()
Definition isolate.h:939
#define ASSERT(E)
DART_EXPORT void Dart_ExitScope()
DART_EXPORT void Dart_ShutdownIsolate()

Member Function Documentation

◆ benchmark()

Benchmark * dart::BenchmarkIsolateScope::benchmark ( ) const
inline

Definition at line 119 of file benchmark_test.h.

119{ return benchmark_; }

The documentation for this class was generated from the following file: