Flutter Engine
 
Loading...
Searching...
No Matches
txt_run_all_benchmarks.cc
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
10#include "third_party/benchmark/include/benchmark/benchmark.h"
11
12// We will use a custom main to allow custom font directories for consistency.
13int main(int argc, char** argv) {
14 ::benchmark::Initialize(&argc, argv);
17 if (txt::GetFontDir().length() <= 0) {
18 FML_LOG(ERROR) << "Font directory not set via txt::SetFontDir.";
19 return EXIT_FAILURE;
20 }
22
23 std::string icudtl_path =
24 cmd.GetOptionValueWithDefault("icu-data-file-path", "icudtl.dat");
25 fml::icu::InitializeICU(icudtl_path);
26
27 ::benchmark::RunSpecifiedBenchmarks();
28}
std::string GetOptionValueWithDefault(std::string_view name, std::string_view default_value) const
#define FML_LOG(severity)
Definition logging.h:101
#define FML_DCHECK(condition)
Definition logging.h:122
size_t length
char ** argv
Definition library.h:9
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
void InitializeICU(const std::string &icu_data_path)
Definition icu_util.cc:102
CommandLine CommandLineFromPlatformOrArgcArgv(int argc, const char *const *argv)
const std::string & GetFontDir()
void SetFontDir(const std::string &dir)
int main(int argc, char **argv)