Commit graph

171 commits

Author SHA1 Message Date
Carl Worth
b717e98777 cairo-perf: Change outlier elimination and report minimum times.
Instead of just discarding the worst 15% of the results, we now
do IQR-based detection and elimination of outliers. Also, instead
of reporting mean times we now report minimum and median times.
We still do compute the mean and standard deviation for the
detection of when results seem stable for early bailout. And we
do still report the standard deviation.

A statistician might complain that it looks funny to report the
median and the standard deviation together, (instead of median
and average absolute deviation from the median, say), but I liked
the standard deviation since it is always larger, so it might
ensure better separatation if we use it to determine when two
sets of results are sufficiently different to be interesting.
2006-11-02 12:21:26 -08:00
Dan Amelang
d2d0d11bde Add new perf test "pattern_create_radial"
This test is really just for hammering the double to fixed-point conversion
(in _cairo_fixed_from_double) that happens as doubles from API calls gets
translated into internal cairo fixed-point numbers.
2006-11-02 10:38:00 -08:00
Carl Worth
a618fd2cf9 cairo-perf-diff: Simplify git usage and just run cairo-perf that gets built with cairo revision
Many thanks to Josh Triplett for help with theses fixes:

1. Simplify the usage of git to eliminate the fragile and nasty
   stuff we were doing previously, (such as manually symlinking
   things under .git rather than just using git-clone -s).

2. Don't try running latest cairo-perf with LD_LIBRARY_PATH
   pointing to built cairo version. Apparently stupid libtool
   and its use of rpath is foiling us here. Instead just run
   whatever cairo-perf gets built as part of the source that
   gets checked out.

This second point means that cairo-perf-diff won't yet be useful
for comparing the performance of old cairo revisions that pre-date
cairo-perf. I've since been reasing and we might be able to use
--disable-rpath to the configure script to get what we want.
2006-11-02 04:45:27 -08:00
Jamey Sharp
7442b40866 perf: cairo-perf-diff-files.c should generate cairo-perf-diff-files
... rather than overwriting the new cairo-perf-diff script, which
should (by the way) be included in dist tarballs.
2006-10-29 11:18:09 -08:00
Carl Worth
a9f51c2973 Add new cairo-perf-diff for finding the performance difference between any 2 revisions.
The old cairo-perf-diff is now named cairo-perf-diff-files, but
the new one calls out to it and can still be used in an identical
way.

The new cairo-perf-diff can also be used to see what the performance
impact of a single commit is like so:

	cairo-perf-diff HEAD

or between two commits:

	cairo-perf-diff 1.2.4 HEAD

The script is careful to always run the latest cairo-perf program
even when testing old versions of the library. Also, the output
from any given performance run is cached so it gets less painful
to run as the cache gets primed (the cache is in .perf next to
.git).

The script is still a bit fragile in spots. In particular it depends
on cairo-perf being built in advance but doesn't do anythin to ensure
that happens.
2006-10-25 17:15:22 -07:00
Behdad Esfahbod
838ff68cd5 [perf] Remove SUBDIRS=../boilerplate and add explicit dependencies
This is quite like what I just did in test/.  We can now require an older
version of automake as we used to.
2006-10-25 16:07:34 -04:00
Carl Worth
99e2e99a78 Use zero-size change bar for a speedup/slowdown of 1.0
Also use speedup/slowdown rather than faster/slower in the output
2006-10-18 15:47:18 -07:00
Carl Worth
a53eabf0a5 Add cairo-perf-diff program for comparing two cairo-perf reports. 2006-10-18 12:16:50 -07:00
Carl Worth
5c7798a646 perf: Print ticks as well as ms in output.
The ticks value is a bit more reliable since it won't exhibit
variation due to estimating the CPU frequency like the ms value
will.
2006-10-18 12:11:26 -07:00
Carl Worth
bb3d4b2f88 cairo-perf: Remove wasted whitespace in output. Squelch wanring. 2006-10-18 12:11:26 -07:00
Carl Worth
d8c23d5ed7 perf: Change minimum size of paint test to 256
The paint tests at sizes less than 256 were just too fast to be
significant.
2006-10-18 12:11:26 -07:00
Carl Worth
71037f3612 Rename wait_for_rendering to syncrhonize
We're not using this call both before and after rendering
so the old name just didn't make sense anymore.
2006-10-16 09:07:47 -07:00
Carl Worth
648f4bc830 perf: Make iterations adaptive (bailing as soon as std. deviation is <= 3% for 5 consecutive iterations
This makes the entire performance test suite about 10 times faster
on my system. And I don't think that the results are significantly
worse, (many tests are stable after only 5 iterations while some
still run to 100 iterations without reaching our stability criteria).
2006-10-12 15:12:01 -07:00
Carl Worth
d7c2f7e2d7 perf: Rename finalize to synchronize as it is used in both start() and stop() now 2006-10-05 15:14:14 -07:00
Carl Worth
8af5e14fd8 perf: Do backend synchronization in cairo_perf_timer_start as well as cairo_perf_timer_stop 2006-10-05 15:10:45 -07:00
Carl Worth
5412343a77 perf: Add subimage_copy test to demonstrate performance bug found by monty 2006-10-05 12:31:50 -07:00
Carl Worth
9285a1f7fe perf: Add text test 2006-10-05 12:31:50 -07:00
Carl Worth
bda77f505c perf: Bail if cairo_status returns non-success at the end of a test. 2006-10-04 17:14:12 -07:00
Carl Worth
d15b8f2d6e perf: Add linear and radial gradients to the coverage 2006-10-04 17:14:12 -07:00
Carl Worth
933d845728 Shorten test names in output (drop unneeded _source and _surface) 2006-10-04 17:14:12 -07:00
Carl Worth
fb61fe82d3 perf: Add stroke and fill tests 2006-10-04 17:14:12 -07:00
Carl Worth
d52256df7c perf: Move iteration over sources and operators from paint to new cairo-perf-cover
This will finally allow us to very easily add lots of other
tests that will similarly involve iterating over the various
sources and operators of interest.
2006-10-04 17:14:12 -07:00
Carl Worth
7d5fb687af perf/paint: Test image surface as well as similar surface sources 2006-10-04 17:14:12 -07:00
Carl Worth
94759a14da perf/paint: Use loops for sources and operators rather than open coding.
This looks a bit more complicated for now, but will
scaled much better to provide complete coverage as
we extend the cases covered.
2006-10-04 17:14:11 -07:00
Carl Worth
37bc39d82c perf/paint: Dramatically simplify now that we don't need one callback per run.
This commit begins to show the benefits of the reorganization
from the last few commits. Specifically, we don't need a callback
for every run anymore, and now that the cairo_t* is available to
the paint entry function and the size changes only on the outer
loop, (rather than inside cairo_perf_run), there's no need for
the ugly, static cache for the source surface.
2006-10-04 17:14:11 -07:00
Carl Worth
d0aae4dbcf perf: Make cairo_t* available to perf functions 2006-10-04 17:14:11 -07:00
Carl Worth
4406ab1b9e perf: Move the per-size loop from cairo_perf_run to main
The motivation here is to have the cairo_t context available
to the perf funcs before they call into cairo_perf_run, (so
that they can do one-time setup of source etc. for several
runs).
2006-10-04 17:14:11 -07:00
Carl Worth
251bed8640 perf/paint: Make all sizes use a consistent number of iterations
This effectively reverts the change made in:

	3c407aa80a

The justification is that we want to be able to see the
trends of increasing the image size while keeping the test
the same. But changing the number of iterations in a size-
specific way interferes with that. Also, the standard deviation
is almost always better this way, (though it now varies more
by size).

And as a bonus, the total time required to run the suite is now
less.
2006-10-04 17:14:11 -07:00
Carl Worth
3c19a6413c perf: Rework the suite to allow multiple performance tests to be defined in one file. 2006-09-29 16:42:44 -07:00
Vladimir Vukicevic
a56b962428 Add win32 output files to gitignore 2006-09-19 12:19:21 -07:00
Vladimir Vukicevic
8a9b99e596 [perf] Change perf output format, report times in ms, add a few paint tests
This changes the perf test output format to be a little more human friendly,
reporting times in ms instead of seconds.  It also adds a test number
that could be used in the future for specifying an explicit test to run
(test number, target surface, test name, and size uniquiely identify
a test).

Also adds a few paint tests.
2006-09-19 12:19:20 -07:00
Vladimir Vukicevic
e42905b01b [win32,perf] Fix cairo-perf-win32
Make cairo-perf work on win32
2006-09-19 12:19:20 -07:00
Carl Worth
cb6aed0a81 perf: Make xlib testing wait for the X server to finish rendering.
We do this by adding a new cairo_perf_timer_set_finalize function and
in the case of the xlib backend passing a callback to that function
that does a 1x1 XGetImage.
2006-09-11 10:59:38 -07:00
Carl Worth
78b8555c9a perf: Don't skip COLOR tests 2006-09-09 17:32:50 -07:00
Carl Worth
aeca64f6cd boilerplate: Allow targets to distinguish between test and perf.
Add a new cairo_boilerplate_mode_t so that the boilerplate targets can
do slightly different things if being tested for correctness vs. being
run for performance.
2006-09-09 17:32:50 -07:00
Carl Worth
195fd5cde6 boilerplate: Rename cairo_test_target_t to cairo_boilerplate_target_t 2006-09-09 16:04:51 -07:00
Behdad Esfahbod
c4d863afad [perf/Makefile] Unset DIST_SUBDIRS 2006-09-06 13:49:27 -04:00
Behdad Esfahbod
6b377b62ac Update 2006-09-06 13:49:02 -04:00
Carl Worth
a7844338da perf: Add tessellate test case (in -16, -64, and -256 varieties) 2006-09-06 05:17:01 -07:00
Carl Worth
221c02098f perf: Allow CAIRO_TEST_TARGET to limit targets tested.
Also, don't print the image size for a test if there is only one.
2006-09-06 05:09:19 -07:00
Carl Worth
b866069210 perf: Handle 32-bit wraparound of performance counter 2006-09-06 05:07:08 -07:00
Carl Worth
b64645c567 perf: Fix cairo_perf_ticks_per_second to avoid wraparound 2006-09-06 03:32:07 -07:00
Carl Worth
d9082d59db Prefer CPU performance counters (if available) over gettimeofday.
I've seen this improve the std. deviation often by a factor of 2
and occasionally up to a factor of 10. It is sometimes not much
better, but never seems to be appreciably worse compared to using
gettimeofday.

Thanks to David A. Schleef <ds@schleef.org> and his liboil for
the implementation.
2006-09-06 01:37:13 -07:00
Carl Worth
1085d99bc3 perf/README: Update due to cairo_perf_timer API changes 2006-09-06 00:56:56 -07:00
Carl Worth
3c407aa80a perf-paint: Spend more iterations on smaller sizes to balance testing.
The values here are chosen to try to equalize the standard deviation
of the various tests.
2006-09-06 00:53:52 -07:00
Carl Worth
3519887f18 perf: Move sorting and discarding outside of compute_stats. Adjust discard to slowest 15% only. 2006-09-06 00:52:06 -07:00
Carl Worth
d31037e421 perf: Report times not rates. Interface in integers not doubles. 2006-09-06 00:15:49 -07:00
Carl Worth
9d0d38e0a0 perf: Rename functions in line with cairo's naming guidelines 2006-09-05 22:58:33 -07:00
Carl Worth
9f51fcc888 perf: Fold cairo-perf-timer.h into cairo-perf.h 2006-09-05 22:56:00 -07:00
Carl Worth
499a3a7c47 perf: Remove unused alarm functions 2006-09-05 22:52:00 -07:00