Commit graph

8 commits

Author SHA1 Message Date
Patrik Höglund
0569a12ece Restructure uploader script so imports are less likely to break.
We need to modify sys.path before we import anything from catapult.
Unfortunately we need to modify it according to --outdir, so it needs
to happen at runtime rather than import time.

I try to split the script into a main which just sets up command line
args and sys.path and then imports the main script. This makes it less
likely that future maintainers will import something too early.

Bug: chromium:1029452
Change-Id: I16bf6257269ab8ab90dd74bff7880de8b5fb8071
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170341
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30788}
2020-03-13 12:33:22 +00:00
Patrik Höglund
85037bca98 Hack in allBins into perf results.
Let's see if this makes the perf dashboard accept the upload.
The proper fix requires some catapult work + a couple rolls.

Tbr: mbonadei@webrtc.org
Bug: chromium:1029452
Change-Id: I5fb94a08784620a423c4bd7a5bb6dc7f7c05cdc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170363
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30786}
2020-03-13 09:55:50 +00:00
Patrik Höglund
8f47b27268 Partial revert: "Hand protos directly to histograms and fix summary."
This partially reverts commit 7427fc6560.

Turns out proto importing is broken on the catapult side. A fix is
coming. Until then I'll have to use the old JSON way.

Bug: chromium:1029452
Change-Id: Ib5c43d721fe6c4e2639a0d518f4fa69b42b6c388
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170230
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30761}
2020-03-11 13:56:14 +00:00
Patrik Höglund
7427fc6560 Hand protos directly to histograms and fix summary.
The catapult code has learned how to deserialize protos, so we don't
need JSON as a middle step.

Also, set summary options to false for now to avoid polluting the
dashboard with _avg, _count for each metric. We don't use those
anyway. The durable solution is to set these from the histogram
writer, but catapult doesn't read the summary options correctly
from the proto yet.

Bug: chromium:1029452
Change-Id: I59d300fd34d36df836064ff41f6d0bf75bd6695e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170104
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30737}
2020-03-10 10:43:17 +00:00
Patrik Höglund
7252457778 Print explicitly to stdout to ensure script actually works.
I think it works, just want to make sure (and I think it's good to
print something for the build step).

Bug: chromium:1029452
Change-Id: I8df6818a2fb6305b688ae4ae7517159d1ca5b544
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168602
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@google.com>
Cr-Commit-Position: refs/heads/master@{#30528}
2020-02-17 08:20:58 +00:00
Patrik Höglund
83245bde3d Make the dashboard upload script read protos instead of JSON.
I had to pivot and make tests output protos instead of JSON.
I basically move the proto -> JSON conversion into this script instead
of doing it in the test binary.

This is a temporary state. Later it will be enough to just read up
the file and pass it straight to the Catapult implementation, once
it learns to de-serialize the proto directly.

Bug: chromium:1029452
Change-Id: I7ce992eeeb1a5ae0f20eed54174b08b496e74dfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166920
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30419}
2020-01-30 10:25:47 +00:00
Patrik Höglund
abea26873f Repurpose upload script to read natively generated histogram json.
This script will be used when tests write proto-backed JSON. It still
has to reside source-side because we need to access the catapult Python
API to get at HistogramSet and reserved_infos, etc.

WebRTC tests will write proto-backed JSON, and this script can read
it because the Histogram class has been made capable of doing it.
Build information diagnostics are added, and then we upload in the
old JSON format (the dashboard can read the new format as well, but
there's no reason to implement export to the new format at this point).

We could imagine more outlandish solutions where the test binaries
themselves do the uploading, but then we would have to pass the
build information to them, and they would have to upload from the
shards. Alternatively, we could pass build information to tests so
they write it right into the histograms.

This solution is probably the best one for now since it's
1) consistent with how Chromium does it
2) flexible in the right ways
3) we don't have to worry if uploading from shards even works.

Bug: webrtc:11084
Change-Id: I8888ce9f24e0ca58f984d2c2e9af7740ee5e89b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166464
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30301}
2020-01-17 13:19:07 +00:00
Patrik Höglund
cb0b87473a Add source-side perf upload script for WebRTC.
This effectively makes WebRTC upload histogram sets instead of Chart
JSON. Histogram sets is the newest format used by Chromium. I'm doing
this because it's nice to use the most modern thing, but mostly because
it's the default for PinPoint. This means I don't have to implement and
support a new read quest for Chart JSON.

This script has to be source side, because we need third_party/catapult
to write correct histograms. This script will be called from recipes.

I also considered generating histogram JSON directly in
test/testsupport/perf_test.cc, which could have avoided this conversion
from Chart JSON to histogram sets, but I can't because there is no C++
API for histogram sets.

Bug: webrtc:11084
Change-Id: If0d2315d2057112b3c2d54a9cfd12e59b5858a18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159780
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29818}
2019-11-18 14:37:01 +00:00