Commit graph

21 commits

Author SHA1 Message Date
Mirko Bonadei
d2637a3436 Remove dependency on std::sort implementation detail.
When adding samples to the counter in the test body, most of them get
added at the same time (rtc::TimeMicros()). This means that the
comparator [2] is not able to sort them explicitly (for the comparator
they are equal).

PerfTest.TestGetPerfResultsHistogramsWithStatsCounter was relying on
std::sort implementation being stable, but it is not. If stability is
needed, std::stable_sort should be used so this CL switches
::webrtc::test:GetSortedSamples() to std::stable_sort.

[1] - https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/api/numerics/samples_stats_counter.cc;l=31;drc=9d777620236ec76754cfce19f6e82dd18e52d22c
[2] - https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/test/testsupport/perf_test.cc;l=51-55;drc=a2e3d80cf6f8833ec6f2c5f8e69c2a58a52ddd62

Bug: None
Change-Id: I99a44720ce3ad577f0cdb42aa633bd73d62aeaff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35600}
2021-12-30 19:43:39 +00:00
Artem Titov
eecc4f5e7c Fix: when SamplesStatsCounter is empty it's not propagated to the Histogram perf output
Bug: None
Change-Id: I5664c39ed702b8ca581d28a08900f7a7d435d6ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212610
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33512}
2021-03-20 14:05:59 +00:00
Mirko Bonadei
9ff23bad06 Fix order-dependent tests.
webrtc::test::GetPerfResults() relies on a singleton and this makes
some tests be order dependent (running in a different order makes them
fail).

A good fix is to remove the singleton but this CL at least makes the
fragile test set up the environment correctly.

No-Try: True
Bug: None
Change-Id: I7ad25f685f0bc5d246beeadedfa9f5a39f3547e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197425
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32823}
2020-12-14 12:59:52 +00:00
Patrik Höglund
a7a0173713 Remove the histogram flag and all Chart JSON code.
Since the flag is now on by default, we can remove it (after all
callers stop passing it).

We can also remove all Chart JSON code from WebRTC since it is
no longer used.

Requires one recipe CL and one downstream CL to land first.

Bug: chromium:1029452
Change-Id: Ic1d62e8ab9dfcd255cd2bf51d153db80d59c564b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171878
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30927}
2020-03-28 13:44:43 +00:00
Patrik Höglund
36b35d528c Reland "Flip histograms to true by default, fix unit in isac_fix_test."
This reverts commit c59a304901.

Reason for revert: Other perf tests greening up, can now land this

Original change's description:
> Revert "Flip histograms to true by default, fix unit in isac_fix_test."
> 
> This reverts commit 7b201012bc.
> 
> Reason for revert: Seems to work, but need to get low bw tests working first
> 
> Original change's description:
> > Flip histograms to true by default, fix unit in isac_fix_test.
> > 
> > Requires downstream changes for all WebRTC perf tests, and
> > a corresponding recipe change so isac_fix_test starts using the new
> > flow.
> > 
> > Bug: chromium:1029452
> > Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30906}
> 
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> 
> Change-Id: I96c2309cd71be14c5a27b515736a32f1b256453c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1029452
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171865
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30913}

TBR=phoglund@webrtc.org,mbonadei@webrtc.org

Change-Id: If39500beeca74b8e0ed9e97724a55529125a2253
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171876
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30920}
2020-03-27 13:05:34 +00:00
Patrik Höglund
c59a304901 Revert "Flip histograms to true by default, fix unit in isac_fix_test."
This reverts commit 7b201012bc.

Reason for revert: Seems to work, but need to get low bw tests working first

Original change's description:
> Flip histograms to true by default, fix unit in isac_fix_test.
> 
> Requires downstream changes for all WebRTC perf tests, and
> a corresponding recipe change so isac_fix_test starts using the new
> flow.
> 
> Bug: chromium:1029452
> Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30906}

TBR=phoglund@webrtc.org,mbonadei@webrtc.org

Change-Id: I96c2309cd71be14c5a27b515736a32f1b256453c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171865
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30913}
2020-03-27 07:57:09 +00:00
Patrik Höglund
7b201012bc Flip histograms to true by default, fix unit in isac_fix_test.
Requires downstream changes for all WebRTC perf tests, and
a corresponding recipe change so isac_fix_test starts using the new
flow.

Bug: chromium:1029452
Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30906}
2020-03-26 19:36:44 +00:00
Patrik Höglund
7f585b3c12 Implement histogram perf results writer.
This will be used by WebRTC tests. It converts results exactly the
same as our downstream implementation (histogram_util).

This implementation should be pretty feature complete, or at least
enough to start testing the end-to-end flow. I will set up some
experimental recipe code and see if this actually makes it into the
dashboard.

Note: needs some catapult changes to land first and be rolled
into Chromium, and then WebRTC.

Bug: chromium:1029452
Change-Id: I939046929652fc27b8fcb18af54bde22886d9228
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166172
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30436}
2020-01-31 11:38:56 +00:00
Artem Titov
9dc209a23a Add ability to disable detailed error message in RTC_CHECKs
Bug: webrtc:11133
Change-Id: I989654f1fb97b476a17956d69ee374406439ea8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160653
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29952}
2019-11-28 17:51:00 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Oleh Prypin
d136b2884e Prevent NaN and Inf values in webrtc_perf_test
That is, cause a fatal error when a test produces such a result.

Bug: webrtc:9767
Change-Id: I588a34aa1e7e34b3036d5661e894676b21072862
Reviewed-on: https://webrtc-review.googlesource.com/c/101320
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24950}
2018-10-03 12:36:31 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Edward Lemur
c492bf1958 Fix JSON format for reporting perf results.
It is list_of_scalar_values, not list_of_scalars.
https://github.com/catapult-project/catapult/blob/master/dashboard/docs/data-format.md

R=phoglund@webrtc.org

Bug: webrtc:7156
Change-Id: I391d507d3e0fd9bf0e8a12a5aa6824278ccfb39c
Reviewed-on: https://webrtc-review.googlesource.com/37642
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21515}
2018-01-08 11:17:22 +00:00
Edward Lemur
cb666f5e03 Increase precision when printing perf_results
The script that processes the RESULT lines doesn't support scientific notation [1],
so "1.234567e+06 units" is interpreted as "1.234567", "e+06 units".

Increase precision so that this is printed as 1234567 instead. I'll also submit a
CL so that the RESULT lines processor supports scientific notation.

[1] https://cs.chromium.org/chromium/build/scripts/slave/performance_log_processor.py?l=410

Bug: chromium:791501
Change-Id: If768d86b7ed07d92541ece6298eac8fe95880e35
Reviewed-on: https://webrtc-review.googlesource.com/29001
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21034}
2017-12-04 13:26:32 +00:00
Edward Lemur
936dfb1cb2 Add a function to report perf results in JSON format.
Add support to report perf results in the JSON format specified in [1].

[1] https://github.com/catapult-project/catapult/blob/master/dashboard/docs/data-format.md


Bug: webrtc:8566
Change-Id: I25f829a4b012b3e2a3d56d61582a674f780148d0
Reviewed-on: https://webrtc-review.googlesource.com/26031
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20950}
2017-11-30 11:20:00 +00:00
Edward Lemur
f49a56b1bf Disable PerfTest.AppendResult on iOS.
It seems 'testing::internal::CaptureStdout()' causes problems
when running on real iOS devices.

No-Try: true
Bug: webrtc:8592
Change-Id: Ia7ee636034c6bd1a1ad7a4fb6a2d32e236f64205
Reviewed-on: https://webrtc-review.googlesource.com/27140
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20948}
2017-11-30 09:07:10 +00:00
Edward Lemur
2f061681cc Make PrintResultList receive a vector of doubles instead of a string.
Also, add more tests to perf_test_unittest.

Bug: webrtc:8566
Change-Id: I8864db7172fa207803d310c4a5fee4bf820a56bd
Reviewed-on: https://webrtc-review.googlesource.com/25823
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20906}
2017-11-28 11:52:38 +00:00
Edward Lemur
f7ff3e8b3a Remove AppendResult* and SystemCommit* functions from perf_test.
They are unused.

Bug: webrtc:8566
Change-Id: Iabc8b30c99f2fddc036f08dc70441db494cc5118
Reviewed-on: https://webrtc-review.googlesource.com/25180
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20838}
2017-11-22 17:59:07 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/test/testsupport/perf_test_unittest.cc (Browse further)