Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a benchmarking module to wrench. #969

Merged
merged 1 commit into from Mar 8, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Some generated files are not rendered by default. Learn more.

@@ -24,6 +24,8 @@ osmesa-sys = { version = "0.1.2", optional = true }
osmesa-src = { git = "https://github.com/servo/osmesa-src", optional = true }
webrender = {path = "../webrender"}
webrender_traits = {path = "../webrender_traits"}
serde_derive = "0.9"
serde = "0.9"

[features]
headless = [ "osmesa-sys", "osmesa-src" ]
@@ -0,0 +1,3 @@
simple-batching.yaml
large-clip-rect.yaml

@@ -0,0 +1,59 @@
---
root:
items:
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
- type: rect
bounds: [0, 0, 1024, 1024]
color: red
clip:
complex:
- rect: [0, 0, 1024, 1024]
radius: 16
@@ -0,0 +1,45 @@
---
root:
items:
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
- type: rect
bounds: [0, 0, 512, 512]
color: green
@@ -103,3 +103,21 @@ subcommands:
help: a specific reftest or directory to run
required: false
index: 1
- perf:
about: run benchmarks
args:
- filename:
help: name of the file to save benchmarks to
required: true
index: 1
- compare_perf:
about: compare two benchmark files
args:
- first_filename:
help: first benchmark file to compare
required: true
index: 1
- second_filename:
help: second benchmark file to compare
required: true
index: 2
@@ -21,6 +21,8 @@ extern crate image;
extern crate lazy_static;
#[cfg(feature = "headless")]
extern crate osmesa_sys;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate time;
extern crate webrender;
@@ -30,6 +32,7 @@ extern crate yaml_rust;
mod binary_frame_reader;
mod json_frame_writer;
mod parse_function;
mod perf;
mod png;
mod reftest;
mod scene;
@@ -43,6 +46,7 @@ use gleam::gl;
use glutin::{ElementState, VirtualKeyCode, WindowProxy};
use image::ColorType;
use image::png::PNGEncoder;
use perf::PerfHarness;
use reftest::ReftestHarness;
use std::cmp::{max, min};
#[cfg(feature = "headless")]
@@ -324,6 +328,17 @@ fn main() {
let specific_reftest = subargs.value_of("REFTEST").map(|x| Path::new(x));
harness.run(&base_manifest, specific_reftest);
return;
} else if let Some(subargs) = args.subcommand_matches("perf") {
let harness = PerfHarness::new(&mut wrench, &mut window);
let base_manifest = Path::new("benchmarks/benchmarks.list");
let filename = subargs.value_of("filename").unwrap();
harness.run(&base_manifest, filename);
return;
} else if let Some(subargs) = args.subcommand_matches("compare_perf") {
let first_filename = subargs.value_of("first_filename").unwrap();
let second_filename = subargs.value_of("second_filename").unwrap();
perf::compare(first_filename, second_filename);
return;
} else {
panic!("Should never have gotten here");
};
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.