blob: 856905d35b3d92206a6cd5bfd3a0bb4722d17b4b [file]
// Copyright 2023 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// The initial page to load upon opening the DevTools benchmark app or
/// reloading it in Chrome.
///
/// We use an empty initial page so that the benchmark server does not attempt
/// to load the default page 'index.html', which will show up as "page not
/// found" in DevTools.
const _benchmarkInitialPage = '';
const _wasmQueryParameters = {'wasm': 'true'};
String benchmarkPath({required bool useWasm}) =>
Uri(
path: _benchmarkInitialPage,
queryParameters: useWasm ? _wasmQueryParameters : null,
).toString();
String generateBenchmarkEntryPoint({required bool useWasm}) {
return 'benchmark/test_infra/client/client_${useWasm ? 'wasm' : 'js'}.dart';
}
const devtoolsBenchmarkPrefix = 'devtools';
enum DevToolsBenchmark {
navigateThroughOfflineScreens,
offlineCpuProfilerScreen,
offlinePerformanceScreen;
String get id => '${devtoolsBenchmarkPrefix}_$name';
}