5#include "flutter/shell/common/shell.h"
7#include "flutter/benchmarking/benchmarking.h"
8#include "flutter/shell/common/thread_host.h"
9#include "flutter/testing/dart_fixture.h"
10#include "flutter/testing/dart_isolate_runner.h"
11#include "flutter/testing/testing.h"
32BENCHMARK_F(DartNativeBenchmarks, TimeToFirstNativeMessageFromIsolateInNewVM)
34 while (st.KeepRunning()) {
38 AddNativeCallback(
"NotifyNative",
43 const auto settings = CreateSettingsForFixture();
46 ThreadHost thread_host(
"io.flutter.test.DartNativeBenchmarks.",
47 ThreadHost::Type::kPlatform | ThreadHost::Type::kIo |
48 ThreadHost::Type::kUi);
49 TaskRunners task_runners(
51 thread_host.platform_thread->GetTaskRunner(),
52 thread_host.platform_thread->GetTaskRunner(),
53 thread_host.ui_thread->GetTaskRunner(),
54 thread_host.io_thread->GetTaskRunner()
69BENCHMARK_F(DartNativeBenchmarks, MultipleDartToNativeMessages)
71 while (st.KeepRunning()) {
75 AddNativeCallback(
"NotifyNative",
80 const auto settings = CreateSettingsForFixture();
83 ThreadHost thread_host(
"io.flutter.test.DartNativeBenchmarks.",
84 ThreadHost::Type::kPlatform | ThreadHost::Type::kIo |
85 ThreadHost::Type::kUi);
86 TaskRunners task_runners(
88 thread_host.platform_thread->GetTaskRunner(),
89 thread_host.platform_thread->GetTaskRunner(),
90 thread_host.ui_thread->GetTaskRunner(),
91 thread_host.io_thread->GetTaskRunner()
97 "thousandCallsToNative", {},
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
static bool IsInstanceRunning()
void TearDown(const ::benchmark::State &state)
void SetUp(const ::benchmark::State &state)
struct _Dart_NativeArguments * Dart_NativeArguments
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::string GetDefaultKernelFilePath()
Returns the default path to kernel_blob.bin. This file is within the directory returned by GetFixture...
std::unique_ptr< AutoIsolateShutdown > RunDartCodeInIsolate(DartVMRef &vm_ref, const Settings &settings, const TaskRunners &task_runners, std::string entrypoint, const std::vector< std::string > &args, const std::string &kernel_file_path, fml::WeakPtr< IOManager > io_manager, std::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::unique_ptr< PlatformConfiguration > platform_configuration)
BENCHMARK_F(SkParagraphFixture, ShortLayout)(benchmark
#define CREATE_NATIVE_ENTRY(native_entry)