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 | #include "benchmarking.h" |
6 | |
7 | #include "flutter/fml/backtrace.h" |
8 | #include "flutter/fml/build_config.h" |
9 | #include "flutter/fml/command_line.h" |
10 | #include "flutter/fml/icu_util.h" |
11 | |
12 | namespace benchmarking { |
13 | |
14 | int Main(int argc, char** argv) { |
15 | fml::InstallCrashHandler(); |
16 | #if !defined(FML_OS_ANDROID) |
17 | fml::CommandLine cmd = fml::CommandLineFromPlatformOrArgcArgv(argc, argv); |
18 | std::string icudtl_path = |
19 | cmd.GetOptionValueWithDefault(name: "icu-data-file-path", default_value: "icudtl.dat"); |
20 | fml::icu::InitializeICU(icu_data_path: icudtl_path); |
21 | #endif |
22 | benchmark::Initialize(argc: &argc, argv); |
23 | ::benchmark::RunSpecifiedBenchmarks(); |
24 | return 0; |
25 | } |
26 | |
27 | } // namespace benchmarking |
28 | |
29 | int main(int argc, char** argv) { |
30 | return benchmarking::Main(argc, argv); |
31 | } |
32 |