Revert "Reland "iOS: Save perf results under Documents/perf_result.json""
This reverts commit 8b886bb077d54e2bf6198559557ae97b03023611. Reason for revert: Breaks downstream projects. Original change's description: > Reland "iOS: Save perf results under Documents/perf_result.json" > > This will require a manual roll to downstream projects, since > the //test:perf_test target was introduced. > > This is a reland of 10a8e7a9b5261a7e3ce19900ba3511be3b5911f8 > Original change's description: > > iOS: Save perf results under Documents/perf_result.json > > > > TBR=henrika@webrtc.org > > > > Bug: webrtc:7156 > > Change-Id: Ib00992cce0007e0b5c9274340df1a892f810b0c5 > > Reviewed-on: https://webrtc-review.googlesource.com/29202 > > Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#21244} > > TBR=henrika@webrtc.org, phoglund@webrtc.org > > No-Try: true > Bug: webrtc:7156 > Change-Id: Iecdb108f605fd1c98acde4d50ab4f5a7b5f6bfaf > Reviewed-on: https://webrtc-review.googlesource.com/32761 > Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org> > Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#21252} TBR=phoglund@webrtc.org,ehmaldonado@webrtc.org,henrika@webrtc.org Change-Id: If4c72fa61dba3a3157fb9696b7f22664522b9467 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:7156 Reviewed-on: https://webrtc-review.googlesource.com/33040 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21279}
This commit is contained in:
committed by
Commit Bot
parent
1a339c35d8
commit
712989d86d
@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "rtc_base/flags.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "system_wrappers/include/metrics_default.h"
|
||||
@ -24,24 +26,6 @@ DEFINE_string(NSTreatUnknownArgumentsAsOpen, "",
|
||||
"Intentionally ignored flag intended for iOS simulator.");
|
||||
DEFINE_string(ApplePersistenceIgnoreState, "",
|
||||
"Intentionally ignored flag intended for iOS simulator.");
|
||||
DEFINE_bool(
|
||||
save_chartjson_result,
|
||||
false,
|
||||
"Store the perf results in Documents/perf_result.json in the format "
|
||||
"described by "
|
||||
"https://github.com/catapult-project/catapult/blob/master/dashboard/docs/"
|
||||
"data-format.md.");
|
||||
|
||||
#else
|
||||
|
||||
DEFINE_string(
|
||||
chartjson_result_file,
|
||||
"",
|
||||
"Path where the perf results should be stored in the JSON format described "
|
||||
"by "
|
||||
"https://github.com/catapult-project/catapult/blob/master/dashboard/docs/"
|
||||
"data-format.md.");
|
||||
|
||||
#endif
|
||||
|
||||
DEFINE_bool(logs, false, "print logs to stderr");
|
||||
@ -51,6 +35,13 @@ DEFINE_string(force_fieldtrials, "",
|
||||
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
|
||||
" will assign the group Enable to field trial WebRTC-FooFeature.");
|
||||
|
||||
DEFINE_string(
|
||||
chartjson_result_file,
|
||||
"",
|
||||
"Path where the perf results should be stored it the JSON format described "
|
||||
"by "
|
||||
"https://github.com/catapult-project/catapult/blob/master/dashboard/docs/"
|
||||
"data-format.md.");
|
||||
|
||||
DEFINE_bool(help, false, "Print this message.");
|
||||
|
||||
@ -75,25 +66,21 @@ int main(int argc, char* argv[]) {
|
||||
webrtc::test::InitFieldTrialsFromString(fieldtrials);
|
||||
webrtc::metrics::Enable();
|
||||
|
||||
|
||||
rtc::LogMessage::SetLogToStderr(FLAG_logs);
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
|
||||
rtc::test::InitTestSuite(RUN_ALL_TESTS, argc, argv,
|
||||
FLAG_save_chartjson_result);
|
||||
rtc::test::InitTestSuite(RUN_ALL_TESTS, argc, argv);
|
||||
rtc::test::RunTestsFromIOSApp();
|
||||
|
||||
#else
|
||||
#endif
|
||||
|
||||
int exit_code = RUN_ALL_TESTS();
|
||||
|
||||
std::string chartjson_result_file = FLAG_chartjson_result_file;
|
||||
if (chartjson_result_file != "") {
|
||||
webrtc::test::WritePerfResults(chartjson_result_file);
|
||||
std::string json_results = webrtc::test::GetPerfResultsJSON();
|
||||
std::fstream json_file(chartjson_result_file, std::fstream::out);
|
||||
json_file << json_results;
|
||||
json_file.close();
|
||||
}
|
||||
|
||||
return exit_code;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user