Commit graph

114 commits

Author SHA1 Message Date
Carl Worth
72b812be8c perf: Add new paint-with-alpha test
MacSlow noticed that cairo_paint_with_alpha is much slower than
it should be, (and jrmuizel has a nice plan for fixing the
performance bug).
2007-04-25 07:24:23 -07:00
Behdad Esfahbod
157074c794 [boilerplate] Add cairo_boilerplate_get/free_targets
This means, test and perf suites now share the same target handling
code, including parsing CAIRO_TEST_TARGET.
2007-04-18 19:46:30 -04:00
Behdad Esfahbod
b9026d0b13 [perf] Make targets more consistent with the test suite
That is:
1) no VALGRING vs VG abbreviations
2) setting TARGETS and ITERS on the make command line works now
2007-04-18 19:09:53 -04:00
Chris Wilson
a396e0b057 cairo-perf - add the missing newline.
Oops, missed out the newline for the fprintf in the previous commit.
2007-04-18 14:24:10 +01:00
Chris Wilson
383e9d5368 cairo-perf - Check that the surface is created.
Exit(1) if we fail to create the target surface.
2007-04-18 14:13:42 +01:00
Mathias Hasselmann
dd4601b0d0 [cairo-perf] Emit warning, if cairo-perf is not CPU bound
cairo-perf and the X server should be bound to CPUs (either the same
	or separate) on SMP systems. Not doing so causes random results when
	the X server is moved to or from cairo-perf's CPU during the
	benchmarks.
2007-03-16 20:43:29 +01:00
Chris Wilson
92d331a234 Fix up the trivial leaks found by valgrind. 2007-03-07 09:25:12 -08:00
Vladimir Vukicevic
be451cd83d [quartz] rename NQUARTZ -> QUARTZ in defines 2007-02-20 12:54:03 -08:00
Dan Amelang
382e021ccb Add "rectangles" perf test
This test draws many small, solid pixel-aligned rectangles one at a
time.
2007-01-31 11:53:06 -08:00
Carl Worth
d5531c4f50 Add unaligned_clip perf case courtesy of Jeff Muizelaar
Conflicts:

	perf/Makefile.am
	perf/cairo-perf.c
	perf/cairo-perf.h
2007-01-09 14:31:22 -08:00
Carl Worth
cc11c264ec Add long-lines perf case
This shows some very bad slowness for lines that are mostly
offscreen (like 100x slower than just drawing the visible
portion).
2007-01-05 16:50:11 -08:00
M Joonas Pihlaja
4c95e2b7bf New performance test case "mosaic" for splines. 2006-12-16 21:32:19 +02:00
Carl Worth
1ed3811338 perf: Add box_outline test case.
This test shows that drawing a 100x100 single-pixel wide box outline is
currently 5 to 16 times slower when using the natural cairo_stroke() as
compared to a rather awkward cairo_fill() of two rectangles.

[ # ]  backend-content                    test-size min(ticks)  min(ms) median(ms) stddev. iterations
[  0]    image-rgba         box-outline-stroke-100     301321    0.218    0.219  0.39%   5
[  1]    image-rgba           box-outline-fill-100      18178    0.013    0.013  0.43%   5
[  0]     xlib-rgba         box-outline-stroke-100     379177    0.275    0.276  1.39%   6
[  1]     xlib-rgba           box-outline-fill-100      83355    0.060    0.060  0.17%   5
2006-11-17 18:00:36 -08:00
Carl Worth
a8faa0aef1 cairo-perf: When iteration count is given on command-line, never execute fewer 2006-11-17 17:48:39 -08:00
Carl Worth
f6b400a292 perf: Add world-map performance test case.
The map for this test case was originally demonstrated as a
performance problem in this mozilla bug report:

	A very slow SVG file with <path>s
	https://bugzilla.mozilla.org/show_bug.cgi?id=332413

I obtained permission from the creator of the original file to
include the data here, (see comments in world-map.h for details).
2006-11-08 06:07:01 -08:00
Carl Worth
0d1340f716 perf: Eliminate CAIRO_STATS_MIN_VALID_SAMPLES
We don't need this at this deep level since callers can now
implement this limiting manually since stats.iterations is
now returned. Also, this was interfering with the -i option
to cairo-perf anyway.
2006-11-08 06:07:01 -08:00
Carl Worth
d1e1192090 cairo-perf: Print ticks_per_ms value in raw mode so raw analysis tools can report times 2006-11-08 06:07:01 -08:00
Carl Worth
5393989272 perf: Move statistics code into new cairo-stats.h for sharing 2006-11-08 06:07:01 -08:00
Carl Worth
0564b5074c cairo-perf: Add command line options for test cases to run, listing tests, and new raw mode. 2006-11-07 01:29:38 -08:00
Carl Worth
49b72f004d Add zrusin-another test cases (tessellate and fill).
This new test case is the 0th polygon polygon from Zack Rusin's
recent cairorender program as made avaialable here:

	http://ktown.kde.org/~zrusin/examples/cairorender.tar.bz2

This polygon contains about 1000 coordinates and looks like a
hand-drawn version of the word another.
2006-11-06 23:56:19 -08:00
Carl Worth
52eb7134bd cairo-perf-diff: Use two-part hash to avoid stale data when perf suite changes.
The perf tree's sha1 is now in the cache file name, so that
if the performance suite itself ever changes then new data
will be generated rather than using stale stuff from the cache.

Also, we now use the src tree's sha1 rather than the commit's
so that commits that don't change the src directory are also
treated as identical, (which they really should be as far as
performance of the library itself is concerned).
2006-11-06 09:39:02 -08:00
Carl Worth
e760d0927e Don't rely on NQUARTZ or OS2 surface types unless they exist.
This allows the cairo-perf stuff to build on older checkouts,
(such as 1.2.4), so that we can usefully do things like:

	cairo-perf-diff 1.2.4 HEAD
2006-11-06 09:39:02 -08:00
Carl Worth
5500c59b9b Remove typo (mean vs median)
This didn't end up making a difference in practice since the
median is assigned again later on.
2006-11-02 12:27:17 -08:00
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
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
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
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
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
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
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
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
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
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