Commit Graph

10 Commits

Author SHA1 Message Date
Kevin Lubick
8fd0ccfc9f [skottie] Update lotties_with_assets to include all lotties from lottie-samples
The make_lotties_with_assets is a handy tool to take a
directory of lottie files and move them into their own
folders. This will make it easier to add assets (e.g. fonts,
images) if we want to get more accurate benchmarks.

This also makes the test not stop on the first failure, but complete
all of them, so we can see more easily if multiple things have broken.

Change-Id: Idb2ece71376a11e7524cd513a2798884a44bb59f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421927
Reviewed-by: Florin Malita <fmalita@google.com>
2021-06-28 14:59:24 +00:00
Kevin Lubick
bd71936196 [canvaskit] Document perf-canvaskit-puppeteer
We also catch any errors that happen during running the
test or flushing. This allows them to show up in the CI logs.

For skottie-frames in particular, we stop clearing the canvas
before each render, as that was masking an error (and not how
we do things on skottie.skia.org).

Change-Id: I83936a35b6c314da76a0a64e15deaabd156e71f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421923
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-28 14:59:24 +00:00
Kevin Lubick
6df5cd28db [canvaskit] Revert raster change.
Drawing to a Premul Raster Surface and then copying out Unpremul pixels
was 15x slower. Drawing to an Unpremul Raster surface was a little
slower than the previous RasterDirect surface.

Out of an abundance of caution, I'm going back to the way things were.
We can revisit drawing to a Raster surface in the future.

This also adds better error handling to the SkottieFrames test which
thankfully caught this regression.

Bug: skia:10717
Change-Id: Ib8b9d490c92e013c3311adb1d08de5fa0fc0351c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-11-12 14:49:47 +00:00
Nathaniel Nifong
18423cd5b3 Add more perf tests and other minor improvemnts
Change-Id: I2da6d2da2cb0dd938d04d0b872be7fc5f2a91d6d
Docs-Preview: https://skia.org/?cl=308787
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308787
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-10 15:23:53 +00:00
Nathaniel Nifong
2c4a07d925 allow external files in canvas_perf.js tests
Change-Id: Id4d143605bfa73672130c839cf54eec2b23217d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308233
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-06 20:27:32 +00:00
Nathaniel Nifong
7839a2599f A puppeteer test that runs karma-like tests
Change-Id: Iedd98c03ba9d56b64390ffea23a50c945be9aff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305557
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-29 15:38:56 +00:00
Elliot Evans
d511d9a086 Add Puppeteer perf for release and experimental_simd builds of CanvasKit against SKPs
Adds the command:
  make skps_release_and_SIMD
for perfing builds against a set of SKPs in ~/skps for release and
simd builds of CanvasKit. Also outputs a summary of the perf results
in a table format.

See the document "SIMD CanvasKit Build Performance Testing"
for more details:
https://docs.google.com/document/d/114kdSGPMnOSQCZ7pFgd3MGMn5mIW562RMoXVmD13e0M/edit#

Bug: skia:10453
Change-Id: I311629a1420301dda41f7ec57ce1403b05fd949b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301982
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-16 17:47:08 +00:00
Kevin Lubick
51891392d8 [canvaskit] Add benchmarks on SKPs
For each skp in the corpus, we start a fresh instance of
Chromium (via puppeteer), draw the skp and measure that time.
This process is repeated a fixed amount of repetitions
and the median, the average, and the std deviation is reported
to perf (as well as the individual datapoints as an FYI).

Importantly (and something we'll need to change about
SkottieFrames), we measure the average time between frames
after unlocking the framerate. This ensures we account for
the time needed by the GPU to actually draw (flush() returns
after the GPU has all the instructions, but not necessarily
has been able to draw).

This implementation is very similar to the SkottieFrames
code; a notable deviation is the repetitions are handled
outside of the html, i.e. a new chrome window per run.

I explored using content_shell, but noticed that requires
building Chromium, which our infrastructure is not set up
to do well.

Change-Id: I14fdbdc951604d3fdf06e81a4be7e614d0e53c03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295079
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-06-10 20:11:00 +00:00
Elliot Evans
b437d7b5e4 Add puppeteer perf for performance degredation related to transforming a complex path. Translations
and rotations both have an effect on cache usage. Snapping translations to integer coordinations
reduces cache usage. Opacity of path painting does not have an effect on cache usage.

Bug: skia:10272
Change-Id: Id5d5f08cb43645c9ec44b9d8e5e96643041727c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292280
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-05-29 20:17:14 +00:00
Kevin Lubick
5443bb32a2 [canvaskit] Start a generic puppeteer perfing system.
IMPORTANT LESSON: when bringing in node (and possibly other
executables) via CIPD, add them to the path in gen_tasks_logic
so the parent executable (the task driver itself) has the right
PATH set. Otherwise, the subprocesses it spawns might grab the
wrong version because of how golang handles environments of
subprocesses.

This is starting as a fork of Skottie WASM. I hope to have a more unified
system for creating and running benchmarks.

Overall overview:
gen_tasks_logic.go creates a task in task.json that compiles
CanvasKit and the task drivers and then executes our task
(i.e. perf_puppeteer.go)

perf_puppeteer runs a node program (perf-with-puppeteer.js)
that uses puppeteer to execute benchmarking code on an
html page (canvaskit-skottie-frames-load.html).

I needed to update the node package so npm could be updated from
3.x to 6.14.4 so it knew about `npm ci`. This may not have been
entirely necessary, given the problems of executing the correct
npm (see important lesson above), but it hasn't broken things
further, so more up-to-date is probably a good thing.

Suggested Review Order:
 - canvaskit-skottie-frames-load.html (note it is similar to
   skottie-wasm-perf.html, but it waits for a button click
   to start animating and records times from the main JS thread
   itself)
 - perf-with-puppeteer.js (similar to skottie-wasm-perf.js, but
   has some things made optional [e.g. tracing])
 - perf_puppeteer_test.go (shows the inputs/outputs of various steps)
 - perf_puppeteer.go
 - Everything else.


Change-Id: I380e81b825f36682c257664d488267edaf36369e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285783
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-05-01 19:23:08 +00:00