Hash :
2f4a7518
Author :
Date :
2019-08-16T14:09:13
Refactor perf tests to fix metric/story swapping Refactors the perf tests to fix the issue of metric and story being swapped, which causes issues when trying to convert to histograms. Specifically, does the following: 1. Rolls the version of src/tests/perf_tests/third_party/perf/ to Chromium 476dae823269c8d05b544271af97ad1adb0db8ee 2. Switch to using PerfResultReporter instead of PrintResult directly. 3. Split RenderTestParams::suffix into backend and story; backend is used as part of the metric, while story is used as the story. 4. Remove the "average" metric that was being automatically reported by ANGLEPerfTest, as reported results are automatically averaged. 5. Update the reported metric to more clearly distinguish between test, backend, and metric. It is now name_backend.metric. e.g. DrawCallPerf_vulkan.wall_time. Bug: chromium:923564,chromium:924618 Change-Id: I00cc191407052f23df57dbfa53b6fb088fc26960 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762360 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651
diff --git a/src/tests/perf_tests/third_party/perf/angle-mods.patch b/src/tests/perf_tests/third_party/perf/angle-mods.patch
index a758818c0..e69de29bb 100644
--- a/src/tests/perf_tests/third_party/perf/angle-mods.patch
+++ b/src/tests/perf_tests/third_party/perf/angle-mods.patch
@@ -1,176 +0,0 @@
-diff --git a/src/tests/perf_tests/third_party/perf/angle-mods.patch b/src/tests/perf_tests/third_party/perf/angle-mods.patch
-index d0b640289..e69de29bb 100644
---- a/src/tests/perf_tests/third_party/perf/angle-mods.patch
-+++ b/src/tests/perf_tests/third_party/perf/angle-mods.patch
-@@ -1,61 +0,0 @@
--diff --git a/tests/perf_tests/third_party/perf/perf_test.cc b/tests/perf_tests/third_party/perf/perf_test.cc
--index 0d5abc0..7364330 100644
----- a/tests/perf_tests/third_party/perf/perf_test.cc
--+++ b/tests/perf_tests/third_party/perf/perf_test.cc
--@@ -2,16 +2,51 @@
-- // Use of this source code is governed by a BSD-style license that can be
-- // found in the LICENSE file.
--
---#include "testing/perf/perf_test.h"
--+#include "perf_test.h"
--
-- #include <stdio.h>
---
---#include "base/logging.h"
---#include "base/strings/string_number_conversions.h"
---#include "base/strings/stringprintf.h"
--+#include <stdarg.h>
--+#include <vector>
--
-- namespace {
--
--+namespace base {
--+
--+std::string FormatString(const char *fmt, va_list vararg) {
--+ static std::vector<char> buffer(512);
--+
--+ // Attempt to just print to the current buffer
--+ int len = vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
--+ if (len < 0 || static_cast<size_t>(len) >= buffer.size()) {
--+ // Buffer was not large enough, calculate the required size and resize the buffer
--+ len = vsnprintf(NULL, 0, fmt, vararg);
--+ buffer.resize(len + 1);
--+
--+ // Print again
--+ vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
--+ }
--+
--+ return std::string(buffer.data(), len);
--+}
--+
--+std::string StringPrintf(const char *fmt, ...) {
--+ va_list vararg;
--+ va_start(vararg, fmt);
--+ std::string result = FormatString(fmt, vararg);
--+ va_end(vararg);
--+ return result;
--+}
--+
--+std::string UintToString(unsigned int value) {
--+ return StringPrintf("%u", value);
--+}
--+
--+std::string DoubleToString(double value) {
--+ return StringPrintf("%.10lf", value);
--+}
--+
--+}
--+
-- std::string ResultsToString(const std::string& measurement,
-- const std::string& modifier,
-- const std::string& trace,
-diff --git a/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc b/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
-index 272e6ca17..3a6a41f01 100644
---- a/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
-+++ b/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
-@@ -2,9 +2,9 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
-
--#include "testing/perf/perf_result_reporter.h"
--#include "base/logging.h"
--#include "testing/perf/perf_test.h"
-+#include "perf_result_reporter.h"
-+#include "anglebase/logging.h"
-+#include "perf_test.h"
-
- namespace perf_test {
-
-diff --git a/src/tests/perf_tests/third_party/perf/perf_test.cc b/src/tests/perf_tests/third_party/perf/perf_test.cc
-index 0b0b666db..bc3a6bb8d 100644
---- a/src/tests/perf_tests/third_party/perf/perf_test.cc
-+++ b/src/tests/perf_tests/third_party/perf/perf_test.cc
-@@ -2,16 +2,47 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
-
--#include "testing/perf/perf_test.h"
-+#include "perf_test.h"
-
-+#include <stdarg.h>
- #include <stdio.h>
--
--#include "base/logging.h"
--#include "base/strings/string_number_conversions.h"
--#include "base/strings/stringprintf.h"
-+#include <vector>
-
- namespace {
-
-+std::string FormatString(const char *fmt, va_list vararg) {
-+ static std::vector<char> buffer(512);
-+
-+ // Attempt to just print to the current buffer
-+ int len = vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
-+ if (len < 0 || static_cast<size_t>(len) >= buffer.size()) {
-+ // Buffer was not large enough, calculate the required size and resize the buffer
-+ len = vsnprintf(NULL, 0, fmt, vararg);
-+ buffer.resize(len + 1);
-+
-+ // Print again
-+ vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
-+ }
-+
-+ return std::string(buffer.data(), len);
-+}
-+
-+std::string StringPrintf(const char *fmt, ...) {
-+ va_list vararg;
-+ va_start(vararg, fmt);
-+ std::string result = FormatString(fmt, vararg);
-+ va_end(vararg);
-+ return result;
-+}
-+
-+std::string NumberToString(size_t value) {
-+ return StringPrintf("%u", value);
-+}
-+
-+std::string NumberToString(double value) {
-+ return StringPrintf("%.10lf", value);
-+}
-+
- std::string ResultsToString(const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
-@@ -23,7 +54,7 @@ std::string ResultsToString(const std::string& measurement,
- // <*>RESULT <graph_name>: <trace_name>= <value> <units>
- // <*>RESULT <graph_name>: <trace_name>= {<mean>, <std deviation>} <units>
- // <*>RESULT <graph_name>: <trace_name>= [<value>,value,value,...,] <units>
-- return base::StringPrintf("%sRESULT %s%s: %s= %s%s%s %s\n",
-+ return StringPrintf("%sRESULT %s%s: %s= %s%s%s %s\n",
- important ? "*" : "", measurement.c_str(), modifier.c_str(),
- trace.c_str(), prefix.c_str(), values.c_str(), suffix.c_str(),
- units.c_str());
-@@ -53,7 +84,7 @@ void PrintResult(const std::string& measurement,
- size_t value,
- const std::string& units,
- bool important) {
-- PrintResultsImpl(measurement, modifier, trace, base::NumberToString(value),
-+ PrintResultsImpl(measurement, modifier, trace, NumberToString(value),
- std::string(), std::string(), units, important);
- }
-
-@@ -63,7 +94,7 @@ void PrintResult(const std::string& measurement,
- double value,
- const std::string& units,
- bool important) {
-- PrintResultsImpl(measurement, modifier, trace, base::NumberToString(value),
-+ PrintResultsImpl(measurement, modifier, trace, NumberToString(value),
- std::string(), std::string(), units, important);
- }
-
-@@ -75,7 +106,7 @@ void AppendResult(std::string& output,
- const std::string& units,
- bool important) {
- output +=
-- ResultsToString(measurement, modifier, trace, base::NumberToString(value),
-+ ResultsToString(measurement, modifier, trace, NumberToString(value),
- std::string(), std::string(), units, important);
- }
-
diff --git a/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc b/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
index 272e6ca17..fcbfa78b3 100644
--- a/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
+++ b/src/tests/perf_tests/third_party/perf/perf_result_reporter.cc
@@ -2,72 +2,77 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "testing/perf/perf_result_reporter.h"
-#include "base/logging.h"
-#include "testing/perf/perf_test.h"
+#include "perf_result_reporter.h"
+#include "anglebase/logging.h"
+#include "perf_test.h"
-namespace perf_test {
+namespace perf_test
+{
-PerfResultReporter::PerfResultReporter(const std::string& metric_basename,
- const std::string& story_name)
- : metric_basename_(metric_basename), story_name_(story_name) {}
+PerfResultReporter::PerfResultReporter(const std::string &metric_basename,
+ const std::string &story_name)
+ : metric_basename_(metric_basename), story_name_(story_name)
+{}
PerfResultReporter::~PerfResultReporter() = default;
-void PerfResultReporter::RegisterFyiMetric(const std::string& metric_suffix,
- const std::string& units) {
- RegisterMetric(metric_suffix, units, false);
+void PerfResultReporter::RegisterFyiMetric(const std::string &metric_suffix,
+ const std::string &units)
+{
+ RegisterMetric(metric_suffix, units, false);
}
-void PerfResultReporter::RegisterImportantMetric(
- const std::string& metric_suffix,
- const std::string& units) {
- RegisterMetric(metric_suffix, units, true);
+void PerfResultReporter::RegisterImportantMetric(const std::string &metric_suffix,
+ const std::string &units)
+{
+ RegisterMetric(metric_suffix, units, true);
}
-void PerfResultReporter::AddResult(const std::string& metric_suffix,
- size_t value) {
- auto iter = metric_map_.find(metric_suffix);
- CHECK(iter != metric_map_.end());
+void PerfResultReporter::AddResult(const std::string &metric_suffix, size_t value)
+{
+ auto iter = metric_map_.find(metric_suffix);
+ CHECK(iter != metric_map_.end());
- PrintResult(metric_basename_, metric_suffix, story_name_, value,
- iter->second.units, iter->second.important);
+ PrintResult(metric_basename_, metric_suffix, story_name_, value, iter->second.units,
+ iter->second.important);
}
-void PerfResultReporter::AddResult(const std::string& metric_suffix,
- double value) {
- auto iter = metric_map_.find(metric_suffix);
- CHECK(iter != metric_map_.end());
+void PerfResultReporter::AddResult(const std::string &metric_suffix, double value)
+{
+ auto iter = metric_map_.find(metric_suffix);
+ CHECK(iter != metric_map_.end());
- PrintResult(metric_basename_, metric_suffix, story_name_, value,
- iter->second.units, iter->second.important);
+ PrintResult(metric_basename_, metric_suffix, story_name_, value, iter->second.units,
+ iter->second.important);
}
-void PerfResultReporter::AddResult(const std::string& metric_suffix,
- const std::string& value) {
- auto iter = metric_map_.find(metric_suffix);
- CHECK(iter != metric_map_.end());
+void PerfResultReporter::AddResult(const std::string &metric_suffix, const std::string &value)
+{
+ auto iter = metric_map_.find(metric_suffix);
+ CHECK(iter != metric_map_.end());
- PrintResult(metric_basename_, metric_suffix, story_name_, value,
- iter->second.units, iter->second.important);
+ PrintResult(metric_basename_, metric_suffix, story_name_, value, iter->second.units,
+ iter->second.important);
}
-bool PerfResultReporter::GetMetricInfo(const std::string& metric_suffix,
- MetricInfo* out) {
- auto iter = metric_map_.find(metric_suffix);
- if (iter == metric_map_.end()) {
- return false;
- }
+bool PerfResultReporter::GetMetricInfo(const std::string &metric_suffix, MetricInfo *out)
+{
+ auto iter = metric_map_.find(metric_suffix);
+ if (iter == metric_map_.end())
+ {
+ return false;
+ }
- *out = iter->second;
- return true;
+ *out = iter->second;
+ return true;
}
-void PerfResultReporter::RegisterMetric(const std::string& metric_suffix,
- const std::string& units,
- bool important) {
- CHECK(metric_map_.count(metric_suffix) == 0);
- metric_map_.insert({metric_suffix, {units, important}});
+void PerfResultReporter::RegisterMetric(const std::string &metric_suffix,
+ const std::string &units,
+ bool important)
+{
+ CHECK(metric_map_.count(metric_suffix) == 0);
+ metric_map_.insert({metric_suffix, {units, important}});
}
} // namespace perf_test
diff --git a/src/tests/perf_tests/third_party/perf/perf_result_reporter.h b/src/tests/perf_tests/third_party/perf/perf_result_reporter.h
index 3188d90c9..2620eab3d 100644
--- a/src/tests/perf_tests/third_party/perf/perf_result_reporter.h
+++ b/src/tests/perf_tests/third_party/perf/perf_result_reporter.h
@@ -8,11 +8,13 @@
#include <string>
#include <unordered_map>
-namespace perf_test {
+namespace perf_test
+{
-struct MetricInfo {
- std::string units;
- bool important;
+struct MetricInfo
+{
+ std::string units;
+ bool important;
};
// A helper class for using the perf test printing functions safely, as
@@ -32,32 +34,28 @@ struct MetricInfo {
// a single "100_chars" story. If an additional story run is added, e.g.
// "200_chars", then the metrics will be averaged over both runs with the
// ability to drill down into results for specific stories.
-class PerfResultReporter {
- public:
- PerfResultReporter(const std::string& metric_basename,
- const std::string& story_name);
- ~PerfResultReporter();
-
- void RegisterFyiMetric(const std::string& metric_suffix,
- const std::string& units);
- void RegisterImportantMetric(const std::string& metric_suffix,
- const std::string& units);
- void AddResult(const std::string& metric_suffix, size_t value);
- void AddResult(const std::string& metric_suffix, double value);
- void AddResult(const std::string& metric_suffix, const std::string& value);
-
- // Returns true and fills the pointer if the metric is registered, otherwise
- // returns false.
- bool GetMetricInfo(const std::string& metric_suffix, MetricInfo* out);
-
- private:
- void RegisterMetric(const std::string& metric_suffix,
- const std::string& units,
- bool important);
-
- std::string metric_basename_;
- std::string story_name_;
- std::unordered_map<std::string, MetricInfo> metric_map_;
+class PerfResultReporter
+{
+ public:
+ PerfResultReporter(const std::string &metric_basename, const std::string &story_name);
+ ~PerfResultReporter();
+
+ void RegisterFyiMetric(const std::string &metric_suffix, const std::string &units);
+ void RegisterImportantMetric(const std::string &metric_suffix, const std::string &units);
+ void AddResult(const std::string &metric_suffix, size_t value);
+ void AddResult(const std::string &metric_suffix, double value);
+ void AddResult(const std::string &metric_suffix, const std::string &value);
+
+ // Returns true and fills the pointer if the metric is registered, otherwise
+ // returns false.
+ bool GetMetricInfo(const std::string &metric_suffix, MetricInfo *out);
+
+ private:
+ void RegisterMetric(const std::string &metric_suffix, const std::string &units, bool important);
+
+ std::string metric_basename_;
+ std::string story_name_;
+ std::unordered_map<std::string, MetricInfo> metric_map_;
};
} // namespace perf_test
diff --git a/src/tests/perf_tests/third_party/perf/perf_test.cc b/src/tests/perf_tests/third_party/perf/perf_test.cc
index 0b0b666db..1131faf27 100644
--- a/src/tests/perf_tests/third_party/perf/perf_test.cc
+++ b/src/tests/perf_tests/third_party/perf/perf_test.cc
@@ -2,16 +2,49 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "testing/perf/perf_test.h"
+#include "perf_test.h"
+#include <stdarg.h>
#include <stdio.h>
-
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
+#include <vector>
namespace {
+std::string FormatString(const char *fmt, va_list vararg) {
+ static std::vector<char> buffer(512);
+
+ // Attempt to just print to the current buffer
+ int len = vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
+ if (len < 0 || static_cast<size_t>(len) >= buffer.size()) {
+ // Buffer was not large enough, calculate the required size and resize the buffer
+ len = vsnprintf(NULL, 0, fmt, vararg);
+ buffer.resize(len + 1);
+
+ // Print again
+ vsnprintf(&buffer[0], buffer.size(), fmt, vararg);
+ }
+
+ return std::string(buffer.data(), len);
+}
+
+std::string StringPrintf(const char *fmt, ...) {
+ va_list vararg;
+ va_start(vararg, fmt);
+ std::string result = FormatString(fmt, vararg);
+ va_end(vararg);
+ return result;
+}
+
+std::string NumberToString(size_t value)
+{
+ return StringPrintf("%u", value);
+}
+
+std::string NumberToString(double value)
+{
+ return StringPrintf("%.10lf", value);
+}
+
std::string ResultsToString(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
@@ -23,10 +56,9 @@ std::string ResultsToString(const std::string& measurement,
// <*>RESULT <graph_name>: <trace_name>= <value> <units>
// <*>RESULT <graph_name>: <trace_name>= {<mean>, <std deviation>} <units>
// <*>RESULT <graph_name>: <trace_name>= [<value>,value,value,...,] <units>
- return base::StringPrintf("%sRESULT %s%s: %s= %s%s%s %s\n",
- important ? "*" : "", measurement.c_str(), modifier.c_str(),
- trace.c_str(), prefix.c_str(), values.c_str(), suffix.c_str(),
- units.c_str());
+ return StringPrintf("%sRESULT %s%s: %s= %s%s%s %s\n", important ? "*" : "", measurement.c_str(),
+ modifier.c_str(), trace.c_str(), prefix.c_str(), values.c_str(),
+ suffix.c_str(), units.c_str());
}
void PrintResultsImpl(const std::string& measurement,
@@ -53,8 +85,8 @@ void PrintResult(const std::string& measurement,
size_t value,
const std::string& units,
bool important) {
- PrintResultsImpl(measurement, modifier, trace, base::NumberToString(value),
- std::string(), std::string(), units, important);
+ PrintResultsImpl(measurement, modifier, trace, NumberToString(value), std::string(),
+ std::string(), units, important);
}
void PrintResult(const std::string& measurement,
@@ -63,8 +95,8 @@ void PrintResult(const std::string& measurement,
double value,
const std::string& units,
bool important) {
- PrintResultsImpl(measurement, modifier, trace, base::NumberToString(value),
- std::string(), std::string(), units, important);
+ PrintResultsImpl(measurement, modifier, trace, NumberToString(value), std::string(),
+ std::string(), units, important);
}
void AppendResult(std::string& output,
@@ -74,9 +106,8 @@ void AppendResult(std::string& output,
size_t value,
const std::string& units,
bool important) {
- output +=
- ResultsToString(measurement, modifier, trace, base::NumberToString(value),
- std::string(), std::string(), units, important);
+ output += ResultsToString(measurement, modifier, trace, NumberToString(value), std::string(),
+ std::string(), units, important);
}
void PrintResult(const std::string& measurement,
diff --git a/src/tests/perf_tests/third_party/perf/perf_test.h b/src/tests/perf_tests/third_party/perf/perf_test.h
index 36e2916c5..d269a34cf 100644
--- a/src/tests/perf_tests/third_party/perf/perf_test.h
+++ b/src/tests/perf_tests/third_party/perf/perf_test.h
@@ -7,7 +7,8 @@
#include <string>
-namespace perf_test {
+namespace perf_test
+{
// Prints numerical information to stdout in a controlled format, for
// post-processing. |measurement| is a description of the quantity being
@@ -22,94 +23,90 @@ namespace perf_test {
// 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,
+void PrintResult(const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
size_t value,
- const std::string& units,
+ const std::string &units,
bool important);
-void PrintResult(const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
+void PrintResult(const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
double value,
- const std::string& units,
+ const std::string &units,
bool important);
-void AppendResult(std::string& output,
- const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
+void AppendResult(std::string &output,
+ const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
size_t value,
- const std::string& units,
+ const std::string &units,
bool important);
// Like the above version of PrintResult(), but takes a std::string value
// instead of a size_t.
-void PrintResult(const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
- const std::string& value,
- const std::string& units,
+void PrintResult(const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &value,
+ const std::string &units,
bool important);
-void AppendResult(std::string& output,
- const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
- const std::string& value,
- const std::string& units,
+void AppendResult(std::string &output,
+ const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &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 std::string& mean_and_error,
- const std::string& units,
+void PrintResultMeanAndError(const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &mean_and_error,
+ const std::string &units,
bool important);
-void AppendResultMeanAndError(std::string& output,
- const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
- const std::string& mean_and_error,
- const std::string& units,
+void AppendResultMeanAndError(std::string &output,
+ const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &mean_and_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,
- const std::string& values,
- const std::string& units,
+void PrintResultList(const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &values,
+ const std::string &units,
bool important);
-void AppendResultList(std::string& output,
- const std::string& measurement,
- const std::string& modifier,
- const std::string& trace,
- const std::string& values,
- const std::string& units,
+void AppendResultList(std::string &output,
+ const std::string &measurement,
+ const std::string &modifier,
+ const std::string &trace,
+ const std::string &values,
+ const std::string &units,
bool important);
// Prints memory commit charge stats for use by perf graphs.
-void PrintSystemCommitCharge(const std::string& test_name,
- size_t charge,
- bool important);
+void PrintSystemCommitCharge(const std::string &test_name, size_t charge, bool important);
-void PrintSystemCommitCharge(FILE* target,
- const std::string& test_name,
+void PrintSystemCommitCharge(FILE *target,
+ const std::string &test_name,
size_t charge,
bool important);
-std::string SystemCommitChargeToString(const std::string& test_name,
- size_t charge,
- bool important);
+std::string SystemCommitChargeToString(const std::string &test_name, size_t charge, bool important);
} // namespace perf_test