Bug 1656395: Have wrench create a Tracy zone for each reftest. r=gw

This adds a use of the tracy-rs `profile_scope!` macro to
`ReftestHarness::run_reftest`.

Depends on D85509

Differential Revision: https://phabricator.services.mozilla.com/D85510
This commit is contained in:
Jim Blandy 2020-07-31 01:12:15 +00:00
parent 4dfc74a41f
commit f11d8f45ac
4 changed files with 10 additions and 4 deletions

7
gfx/wr/Cargo.lock generated
View File

@ -1646,7 +1646,7 @@ dependencies = [
[[package]]
name = "tracy-rs"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"minidl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1827,7 +1827,7 @@ dependencies = [
"smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"svg_fmt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"tracy-rs 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tracy-rs 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.61.0",
"webrender_build 0.0.1",
@ -1987,6 +1987,7 @@ dependencies = [
"serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
"swgl 0.1.0",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"tracy-rs 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender 0.61.0",
"webrender_api 0.61.0",
"winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2241,7 +2242,7 @@ dependencies = [
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
"checksum tracy-rs 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dbbb439715d4c258415c7cbf137be32a4f54f7348724076145ede565ee2142e8"
"checksum tracy-rs 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ce607aae8ab0ab3abf3a2723a9ab6f09bb8639ed83fdd888d857b8e556c868d8"
"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9"
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4"

View File

@ -31,6 +31,7 @@ winit = "0.19"
serde = {version = "1.0", features = ["derive"] }
semver = "0.9.0"
swgl = { path = "../swgl", optional = true }
tracy-rs = "0.1.2"
[dependencies.image]
version = "0.23"

View File

@ -8,6 +8,8 @@ extern crate clap;
extern crate log;
#[macro_use]
extern crate serde;
#[macro_use]
extern crate tracy_rs;
mod angle;
mod blob;

View File

@ -746,7 +746,9 @@ impl<'a> ReftestHarness<'a> {
}
fn run_reftest(&mut self, t: &Reftest) -> bool {
println!("REFTEST {}", t);
let test_name = t.to_string();
println!("REFTEST {}", test_name);
profile_scope!("wrench reftest", text: &test_name);
self.wrench
.api