diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-22 13:24:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-22 13:24:30 +0100 |
commit | c4c9a9e58aa2c8f94396cc07d23eb6570fd4cd85 (patch) | |
tree | b961e9ae8ebeffdccbc48e7ead15c34906d25828 | |
parent | 5eaba60dd9eaf584a9e09e90fc96743a658321e6 (diff) |
Reorganise repository in preparation of adding 'benchmarks'
More the currents trace to a full/ directory and introduce an empty
benchmark/ directory. I plan to add selected short traces to the
benchmark/ directory that will be useful for the casual benchmarker (or
for quick runs over large number of revisions). In addition to the
reorganisation, I've added a csi-trace utility that has the ability to
trim a trace after a certain period of time has elapsed (since it has to
draw the trace to an image surface in order to satisfy some internal
requirements, this is a reasonable method of trimming replay times).
Note csi-trace probably requires some patches currently in wip queues,
but that should not affect normal operations.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | README | 21 | ||||
-rw-r--r-- | csi-trace.c | 80 | ||||
-rw-r--r-- | full/epiphany-20090810.lzma (renamed from epiphany-20090810.lzma) | bin | 879205 -> 879205 bytes | |||
-rw-r--r-- | full/epiphany-webkit-20090810.lzma (renamed from epiphany-webkit-20090810.lzma) | bin | 30226426 -> 30226426 bytes | |||
-rw-r--r-- | full/evolution-20090607.lzma (renamed from evolution-20090607.lzma) | bin | 1107931 -> 1107931 bytes | |||
-rw-r--r-- | full/evolution-20090618.lzma (renamed from evolution-20090618.lzma) | bin | 1222720 -> 1222720 bytes | |||
-rw-r--r-- | full/firefox-20090601.lzma (renamed from firefox-20090601.lzma) | bin | 27383336 -> 27383336 bytes | |||
-rw-r--r-- | full/firefox-36-20090609.lzma (renamed from firefox-36-20090609.lzma) | bin | 71085102 -> 71085102 bytes | |||
-rw-r--r-- | full/firefox-36-20090611.lzma (renamed from firefox-36-20090611.lzma) | bin | 13675024 -> 13675024 bytes | |||
-rw-r--r-- | full/firefox-periodic-table.lzma (renamed from firefox-periodic-table.lzma) | bin | 416129 -> 416129 bytes | |||
-rw-r--r-- | full/firefox-talos-gfx-20090702.lzma (renamed from firefox-talos-gfx-20090702.lzma) | bin | 132179 -> 132179 bytes | |||
-rw-r--r-- | full/firefox-talos-svg-20090702.lzma (renamed from firefox-talos-svg-20090702.lzma) | bin | 10058915 -> 10058915 bytes | |||
-rw-r--r-- | full/firefox-world-map.lzma (renamed from firefox-world-map.lzma) | bin | 319294 -> 319294 bytes | |||
-rw-r--r-- | full/gnome-system-monitor-20090821.lzma (renamed from gnome-system-monitor-20090821.lzma) | bin | 4385359 -> 4385359 bytes | |||
-rw-r--r-- | full/gnome-terminal-20090601.lzma (renamed from gnome-terminal-20090601.lzma) | bin | 7843774 -> 7843774 bytes | |||
-rw-r--r-- | full/gnome-terminal-20090728.lzma (renamed from gnome-terminal-20090728.lzma) | bin | 5339990 -> 5339990 bytes | |||
-rw-r--r-- | full/poppler-20090811.lzma (renamed from poppler-20090811.lzma) | bin | 12813670 -> 12813670 bytes | |||
-rw-r--r-- | full/poppler-bug-12266.lzma (renamed from poppler-bug-12266.lzma) | bin | 712045 -> 712045 bytes | |||
-rw-r--r-- | full/swfdec-fill-rate-2xaa.lzma (renamed from swfdec-fill-rate-2xaa.lzma) | bin | 3200060 -> 3200060 bytes | |||
-rw-r--r-- | full/swfdec-fill-rate-4xaa.lzma (renamed from swfdec-fill-rate-4xaa.lzma) | bin | 3200255 -> 3200255 bytes | |||
-rw-r--r-- | full/swfdec-fill-rate.lzma (renamed from swfdec-fill-rate.lzma) | bin | 2263691 -> 2263691 bytes | |||
-rw-r--r-- | full/swfdec-giant-steps.lzma (renamed from swfdec-giant-steps.lzma) | bin | 3763684 -> 3763684 bytes | |||
-rw-r--r-- | full/swfdec-youtube.lzma (renamed from swfdec-youtube.lzma) | bin | 132278503 -> 132278503 bytes |
25 files changed, 109 insertions, 8 deletions
@@ -1,3 +1,3 @@ *.trace csi-bind - +csi-trace @@ -1,13 +1,17 @@ NULL := -LZMA := $(wildcard *.lzma) -TRACES := $(LZMA:.lzma=.trace) +FULL_LZMA := $(wildcard full/*.lzma) +QUICK_LZMA := $(wildcard benchmark/*.lzma) +ALL_LZMA:= $(FULL_LZMA) $(QUICK_LZMA) +ALL_TRACES := $(ALL_LZMA:.lzma=.trace) -all: $(TRACES) +all: $(ALL_TRACES) clean: - rm -f $(TRACES) csi-bind + rm -f $(ALL_TRACES) csi-bind csi-trace %.trace: %.lzma csi-bind lzma -cd $< | ./csi-bind > $@ csi-bind: csi-bind.c - $(CC) $^ $(shell pkg-config cairo --cflags --libs) -lcairo-script-interpreter -o $@ + $(CC) $(CFLAGS) $(shell pkg-config cairo --cflags) $^ -lcairo-script-interpreter $(pkg-config cairo --libs) -o $@ +csi-trace: csi-trace.c + $(CC) $(CFLAGS) $(shell pkg-config cairo --cflags) $^ -lcairo-script-interpreter $(shell pkg-config cairo --libs) -o $@ @@ -36,8 +36,13 @@ the run. However, I'm loathe to exclude tests simply because they take too long or can not be run on tiny machines. (Instead, I plan to create subset of tests that have been truncated to run within 60s on a 2GHz Intel Core2.) -Traces ------- +4. If the application significantly improves such that the current trace +is no longer representative of that application, it must be replaced. This +is to ensure that we do not try to optimise for "historically broken +behaviour". + +Traces (found in the full/ directory) +------------------------------------- firefox-20090601 - browsing various news site, in particular the international BBC News website. firefox-36-20090609 - browsing news sites and blogs at font size 36 @@ -83,3 +88,15 @@ epiphany-webkit-20090810 - Running epiphany using the webkit backend over a gnome-system-monitor-20090821 - A clean cairo version of gnome-system-monitor, graphing CPU/memory/network activity whilst reading the news with epiphany. + + +Benchmarks +---------- +The benchmarks are a set of trimmed traces that should run in a reasonable +timeframe (I'm aiming for <10 seconds on a 2GHz Core2 with cairo-image, using +./csi-trace --trim=10). The idea here is that this allows us to quickly +determine a representative metric without running the whole suite -- and is +useful for the casual user. The full traces are kept as they will exercise +corner cases much more thoroughly and are not compromised by the conversion. + +To run the benchmark subset, use cairo-perf-trace benchmark. diff --git a/csi-trace.c b/csi-trace.c new file mode 100644 index 0000000..f3474bf --- /dev/null +++ b/csi-trace.c @@ -0,0 +1,80 @@ +#include <cairo-script.h> +#include <cairo-script-interpreter.h> + +#include <stdio.h> +#include <math.h> +#include <setjmp.h> +#include <time.h> + +static jmp_buf jmp; +static time_t timeout; + +static cairo_format_t +format_from_content (cairo_content_t content) +{ + switch (content) { + case CAIRO_CONTENT_ALPHA: return CAIRO_FORMAT_A8; + case CAIRO_CONTENT_COLOR: return CAIRO_FORMAT_RGB24; + default: + case CAIRO_CONTENT_COLOR_ALPHA: return CAIRO_FORMAT_ARGB32; + } +} + +static cairo_surface_t * +_script_surface_create (void *closure, + cairo_content_t content, + double width, double height) +{ + cairo_surface_t *surface, *image; + cairo_rectangle_t extents; + + if (timeout && time (NULL) > timeout) + longjmp (jmp, 1); + + /* use a image target so that we can use this surface as a source */ + image = cairo_image_surface_create (format_from_content (content), + ceil (width), ceil (height)); + surface = cairo_script_surface_create_for_target (closure, image); + cairo_surface_destroy (image); + + return surface; +} + +static cairo_status_t +write (void *closure, const unsigned char *data, unsigned int length) +{ + if (fwrite (data, length, 1, closure) != 1) + return CAIRO_STATUS_WRITE_ERROR; + + return CAIRO_STATUS_SUCCESS; +} + +int +main (int argc, char **argv) +{ + const cairo_script_interpreter_hooks_t hooks = { + .closure = cairo_script_context_create_for_stream (write, stdout), + .surface_create = _script_surface_create, + }; + cairo_script_interpreter_t *csi; + int i; + + for (i = 1; i < argc; i++) { + if (strcmp (argv[i], "--trim") == 0) { + timeout = atoi (argv[i+1]); + i++; + } else if (strncmp (argv[i], "--trim=", 7) == 0) { + timeout = atoi (argv[i] + 7); + } + } + + if (timeout) + timeout += time (NULL); + + csi = cairo_script_interpreter_create (); + cairo_script_interpreter_install_hooks (csi, &hooks); + if (setjmp (jmp) == 0) + cairo_script_interpreter_feed_stream (csi, stdin); + cairo_script_context_destroy (hooks.closure); + return cairo_script_interpreter_destroy (csi); +} diff --git a/epiphany-20090810.lzma b/full/epiphany-20090810.lzma Binary files differindex 289c996..289c996 100644 --- a/epiphany-20090810.lzma +++ b/full/epiphany-20090810.lzma diff --git a/epiphany-webkit-20090810.lzma b/full/epiphany-webkit-20090810.lzma Binary files differindex 4706794..4706794 100644 --- a/epiphany-webkit-20090810.lzma +++ b/full/epiphany-webkit-20090810.lzma diff --git a/evolution-20090607.lzma b/full/evolution-20090607.lzma Binary files differindex 065bc74..065bc74 100644 --- a/evolution-20090607.lzma +++ b/full/evolution-20090607.lzma diff --git a/evolution-20090618.lzma b/full/evolution-20090618.lzma Binary files differindex 90cc03b..90cc03b 100644 --- a/evolution-20090618.lzma +++ b/full/evolution-20090618.lzma diff --git a/firefox-20090601.lzma b/full/firefox-20090601.lzma Binary files differindex af1eaa4..af1eaa4 100644 --- a/firefox-20090601.lzma +++ b/full/firefox-20090601.lzma diff --git a/firefox-36-20090609.lzma b/full/firefox-36-20090609.lzma Binary files differindex 19b9320..19b9320 100644 --- a/firefox-36-20090609.lzma +++ b/full/firefox-36-20090609.lzma diff --git a/firefox-36-20090611.lzma b/full/firefox-36-20090611.lzma Binary files differindex e1f2880..e1f2880 100644 --- a/firefox-36-20090611.lzma +++ b/full/firefox-36-20090611.lzma diff --git a/firefox-periodic-table.lzma b/full/firefox-periodic-table.lzma Binary files differindex b147f27..b147f27 100644 --- a/firefox-periodic-table.lzma +++ b/full/firefox-periodic-table.lzma diff --git a/firefox-talos-gfx-20090702.lzma b/full/firefox-talos-gfx-20090702.lzma Binary files differindex 2756283..2756283 100644 --- a/firefox-talos-gfx-20090702.lzma +++ b/full/firefox-talos-gfx-20090702.lzma diff --git a/firefox-talos-svg-20090702.lzma b/full/firefox-talos-svg-20090702.lzma Binary files differindex b01e6eb..b01e6eb 100644 --- a/firefox-talos-svg-20090702.lzma +++ b/full/firefox-talos-svg-20090702.lzma diff --git a/firefox-world-map.lzma b/full/firefox-world-map.lzma Binary files differindex 83ef01a..83ef01a 100644 --- a/firefox-world-map.lzma +++ b/full/firefox-world-map.lzma diff --git a/gnome-system-monitor-20090821.lzma b/full/gnome-system-monitor-20090821.lzma Binary files differindex c5060ea..c5060ea 100644 --- a/gnome-system-monitor-20090821.lzma +++ b/full/gnome-system-monitor-20090821.lzma diff --git a/gnome-terminal-20090601.lzma b/full/gnome-terminal-20090601.lzma Binary files differindex a124be5..a124be5 100644 --- a/gnome-terminal-20090601.lzma +++ b/full/gnome-terminal-20090601.lzma diff --git a/gnome-terminal-20090728.lzma b/full/gnome-terminal-20090728.lzma Binary files differindex 1a5a8bb..1a5a8bb 100644 --- a/gnome-terminal-20090728.lzma +++ b/full/gnome-terminal-20090728.lzma diff --git a/poppler-20090811.lzma b/full/poppler-20090811.lzma Binary files differindex 690cb56..690cb56 100644 --- a/poppler-20090811.lzma +++ b/full/poppler-20090811.lzma diff --git a/poppler-bug-12266.lzma b/full/poppler-bug-12266.lzma Binary files differindex d3d1f67..d3d1f67 100644 --- a/poppler-bug-12266.lzma +++ b/full/poppler-bug-12266.lzma diff --git a/swfdec-fill-rate-2xaa.lzma b/full/swfdec-fill-rate-2xaa.lzma Binary files differindex 5ba5d73..5ba5d73 100644 --- a/swfdec-fill-rate-2xaa.lzma +++ b/full/swfdec-fill-rate-2xaa.lzma diff --git a/swfdec-fill-rate-4xaa.lzma b/full/swfdec-fill-rate-4xaa.lzma Binary files differindex daa14e1..daa14e1 100644 --- a/swfdec-fill-rate-4xaa.lzma +++ b/full/swfdec-fill-rate-4xaa.lzma diff --git a/swfdec-fill-rate.lzma b/full/swfdec-fill-rate.lzma Binary files differindex df78e48..df78e48 100644 --- a/swfdec-fill-rate.lzma +++ b/full/swfdec-fill-rate.lzma diff --git a/swfdec-giant-steps.lzma b/full/swfdec-giant-steps.lzma Binary files differindex eff1b04..eff1b04 100644 --- a/swfdec-giant-steps.lzma +++ b/full/swfdec-giant-steps.lzma diff --git a/swfdec-youtube.lzma b/full/swfdec-youtube.lzma Binary files differindex aad0201..aad0201 100644 --- a/swfdec-youtube.lzma +++ b/full/swfdec-youtube.lzma |