Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
3.2 KiB
C
Raw Normal View History

/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef TEST_TESTSUPPORT_PERF_TEST_H_
#define TEST_TESTSUPPORT_PERF_TEST_H_
#include "api/array_view.h"
#include <sstream>
#include <string>
namespace webrtc {
namespace test {
// Prints numerical information to stdout in a controlled format, for
// post-processing. |measurement| is a description of the quantity being
// measured, e.g. "vm_peak"; |modifier| is provided as a convenience and
// will be appended directly to the name of the |measurement|, e.g.
// "_browser"; |trace| is a description of the particular data point, e.g.
// "reference"; |value| is the measured value; and |units| is a description
// of the units of measure, e.g. "bytes". If |important| is true, the output
// line will be specially marked, to notify the post-processor. The strings
// may be empty. They should not contain any colons (:) or equals signs (=).
// A typical post-processing step would be to produce graphs of the data
// produced for various builds, using the combined |measurement| + |modifier|
// string to specify a particular graph and the |trace| to identify a trace
// (i.e., data series) on that graph.
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const double value,
const std::string& units,
bool important);
// Like PrintResult(), but prints a (mean, standard deviation) result pair.
// The |<values>| should be two comma-separated numbers, the mean and
// standard deviation (or other error metric) of the measurement.
void PrintResultMeanAndError(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const double mean,
const double error,
const std::string& units,
bool important);
// Like PrintResult(), but prints an entire list of results. The |values|
// will generally be a list of comma-separated numbers. A typical
// post-processing step might produce plots of their mean and standard
// deviation.
void PrintResultList(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
rtc::ArrayView<const double> values,
const std::string& units,
bool important);
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}
2017-12-14 12:51:07 +00:00
// Get all perf results to date in a JSON format as described in
// https://github.com/catapult-project/catapult/blob/master/dashboard/docs/data-format.md
std::string GetPerfResultsJSON();
// You shouldn't use this function. It's only used to test the functions above.
void ClearPerfResults();
} // namespace test
} // namespace webrtc
#endif // TEST_TESTSUPPORT_PERF_TEST_H_