Skip to content

Commit

Permalink
perf: Only print description once per backend
Browse files Browse the repository at this point in the history
Currently we print the backend description before every time, which is
overly verbose. As the information doesn't^Wshouldn't change, simply
print it before running the first test of each target.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Oct 20, 2010
1 parent 0d93468 commit c6c3bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions perf/cairo-perf-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ describe (cairo_perf_t *perf,
{
char *description = NULL;

if (perf->has_described_backend)
return;
perf->has_described_backend = TRUE;

if (perf->target->describe)
description = perf->target->describe (closure);

Expand Down Expand Up @@ -827,6 +831,7 @@ main (int argc,

perf.target = target;
perf.test_number = 0;
perf.has_described_backend = FALSE;

if (perf.exact_names) {
for (n = 0; n < perf.num_names; n++) {
Expand Down
1 change: 1 addition & 0 deletions perf/cairo-perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ typedef struct _cairo_perf {
const cairo_boilerplate_target_t **targets;
int num_targets;
const cairo_boilerplate_target_t *target;
cairo_bool_t has_described_backend;
unsigned int test_number;
unsigned int size;
cairo_t *cr;
Expand Down

0 comments on commit c6c3bdb

Please sign in to comment.