src/tests/perf_tests/README.md


Log

Author Commit Date CI Message
Cody Northrop fa0de0dd 2025-01-27T17:32:49 restricted_trace_perf: Support --fps-limit Simply passes the flag and value through. Test: restricted_trace_perf.py --fps-limit 30 ... Bug: b/376300037 Change-Id: I344492944babed33edcbdae6b2906795d31715e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6204802 Auto-Submit: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov d6fd7eaf 2023-08-25T16:33:27 Trace/perf tests: remove calibration and most warmup options This removes calibration and warmup except for --warmup (which does what --warmup-steps=-1 used to do: render each frame once with glFinish) Trace and perf tests now default to no warmup. Unchanged by this CL: --fixed-test-time=x runs a single trial for x seconds. --fixed-test-time-with-warmup=x is effectively the above flag coupled with --warmup-steps=-1 --run-to-key-frame runs to the key frame (no longer disables warmup as it's now off by default) Bug: b/297418214 Change-Id: I7a0d3e490067dbde57c5f519c1b9092ba70b1480 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812049 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Roman Lavrov 7e41c5bc 2023-08-24T18:30:43 Remove scripts/perf_test_runner.py and references to it src/tests/run_perf_tests.py is similar and is maintained (runs on CI) Bug: b/297418214 Change-Id: I6fb12ac1fb856672b3bb83c0a4e34eb68afa1475 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812135 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mark Lobodzinski d85de0e9 2023-08-09T14:15:56 Capture/Replay: Add optional replay of trimmed resources This CL: - Adds '--include-inactive-resources' option to angle_trace_tests - Removes the 'trim-enabled' option - Outputs all previously trimmed shaders/programs to trace file in a new Setup function, SetupReplayContextSharedInactive() which is executed only if the new option is specified - Modifies CaptureTest to add inactive resources, but does not set the include-inactive-resources flag Bug: b/296055694 Change-Id: I33b18d5da727d55c90c2012c2bf64b1413521429 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781552 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Cody Northrop 9d7bddc1 2023-08-03T16:46:41 Trace Replay: Allow screenshots of all frames As part of upgrading our traces to the latest format, we want to ensure we get the same rendering results for all frames, including after Reset. To do this, add the ability to pass -1 as the frame to save: angle_trace_tests --gtest_filter=TraceTest.blade_and_soul_revolution \ --use-angle=swiftshader --max-steps-performed 200 \ --screenshot-dir retrace-wip --screenshot-frame -1 In the above solution, there are 100 frames in the trace, but we'll get 200 screenshots (two loops). Bug: b/294882956 Change-Id: I9169403fe716bbe3ea9ba66ce36dfd5a0c58937b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4760424 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Cody Northrop b0739436 2023-02-13T14:28:17 Traces: Add key frame support Allow specifying a key frame in the trace JSON, i.e: "KeyFrames": [ 20 ], This allows our infra to use a frame other than 1 when taking screenshots for quality comparison. Adds new flag `--run-to-key-frame`, which will stop the trace once key frame has been reached. If no key frame in JSON, frame 1 will be used. Note the name in JSON is plural, but we only support one key frame for now. Multiple key frame support can come in the future. This CL also updates the code to allow ending traces early with `--max-steps-performed` which has been broken since http://crrev/c/4008998 It also removes `--one-frame-only` which is superseded by `--run-to-key-frame`, and can be replicated using `--max-steps-performed 1`. Test: angle_trace_tests --gtest_filter="*tmnt_shredders_revenge*" Bug: angleproject:8035 Bug: b/270426257 Change-Id: Ib02ef60d887ae5efb0288f5a9b8c2914dafc6efc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4284637 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cody Northrop 1f69f580 2022-11-18T14:33:20 Perf tests: Add --fixed-test-time-with-warmup Warmup trials combined with fixed-test-time was broken recently. It was already fragile and only worked when parameters were provided in the right order. On Android we're relying on this combination to get steady results without hitting thermal limits. To address this: - Add a new parameter that encapsulates the combination - ASSERT that flags aren't provided in unsupported combinations Test: python3 restricted_trace_perf.py --fixedtime 10 Bug: angleproject:7755 Change-Id: I56fce1f65d4f0538e623951163a9c8736cb3fb03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4027282 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill a41c6173 2022-10-16T08:28:53 Simplify trace test names. Originally we had a lot of conditionally enabled test configs in angle_perftests, that we enabled behind a flag because the total runtime would be too large if we left everything enabled. This CL switches to using a single test set, one for each trace, and using a the same command-line API we use in dEQP and the ANGLE samples to pick a single configuration. This makes it easier to pick exactly what configurations you want from the command line. Because we only run one configuration each time, we don't need to specialize the test name to include the configuration info. We can also simplify TracePerfTest -> TraceTest since these tests are run for both perf and correctness. Old name: TracePerfTest.Run/vulkan_trex_200 New name: TraceTest.trex_200 Example for tests that don't use default arguments: Old args: --enable-all-trace-tests Old name: TracePerfTest.Run/native_offscreen_trex_200 New args: --use-gl=native --offscreen New name: TraceTest.trex_200 Bug: angleproject:7755 Change-Id: Id93cf5725eff2e2c6b3b14804bc2902f38306e7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Jamie Madill 0e0ea026 2022-10-13T18:29:33 Split trace tests out into angle_trace_tests. This makes angle_perftests strictly for microbenchmarks. The trace tests are a better separated target because they are for both gold correctness tests and performance. You can now use the GN arg "build_angle_trace_tests" to control building the trace tests. "build_angle_trace_perf_tests" is still supported for compatibility. Updates the infra scripts to use this new trace tests target. Also updates the build so by default we'll build the trace tests if you check them out, without needing a custom arg. Also updates docs. Bug: angleproject:7755 Change-Id: I2b1ae67799234cc1aefe7cda5f3af945c3f867fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 67af8d89 2022-09-19T15:19:57 Perf Tests: Make dynamic step count calibration optional. This uses a fixed test time for the tests, instead of using an extra step to calibrate a number of steps to run in an approximate maximum time. Before: 1. run a test for <test time>, return the number of steps 2. for <num samples> x <num trials> times, run the tests for that number of steps After: 1. for <num samples> x <num trials> times, run the tests for <test time> This saves some total time since we don't need to run the tests in a pre-process to calibrate the number of steps, and it also makes this test script more like the restricted trace perf script. Bug: angleproject:7671 Change-Id: I413cbf8d65f9f2f87781d8607f799d2450a71ea7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906144 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Roman Lavrov d6acced1 2022-07-25T18:11:20 Add flag --save-screenshots (implied by --screenshot-dir). --screenshot-dir and --render-test-output-dir behave differently on Android. --screenshot-dir is passed as is and therefore means a device directory, and --render-test-output-dir has special handling in Android wrappers that substitutes this flag with a temporary location on the device then copying files to the local directory set by this flag. Cody pointed out that there are many docs referring to --screenshot-dir so behavior should be preserved. So --save-screenshots is implied when this flag is set. Otherwise, it defaults to false, so --render-test-output-dir just on its own won't save screenshots, only when --save-screenshots is added as well. This also allows to produce other artifacts without necessarily producing screenshots by using --render-test-output-dir without --save-screenshots. Bug: angleproject:7299 Change-Id: Ib1a268ddeb7eba9f120e3f37a429ea0e4bbe2411 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3785296 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill 23558369 2022-04-06T15:41:59 Update perf tests arguments. Bug: angleproject:6776 Change-Id: I3cf51cdf9ad05dc792126354c84e717574638408 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566219 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3739a195 2022-03-09T13:56:36 perf tests: Record perf counter metrics. This adds a new command line argument that will allow the user to specify perf counters to record into the test output. Bug: angleproject:4918 Change-Id: Ia7432ff96eadf13ef681f67d2d503d00fd83e06e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516970 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 802e0d4d 2022-02-15T16:40:07 Document perf test metrics Bug: angleproject:1944 Change-Id: I7f0d5c73c943ba28b3e0270e17681d7e69a7ee4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3466757 Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e1bc8de3 2021-09-08T07:59:37 Change links from 'master' to 'main' branch. Bug: chromium:1226949 Change-Id: Ie7b28b2fa094cf0c0a407968d681e580519cbb88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3148210 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9c05f55a 2021-07-15T10:58:10 Capture/Replay: Add replay state validation. We can use this to validate traces that have slight differences when retracing. The valdation works by embedding the "expected" JSON into a string at the end of each captured frame. The replay also embeds a callback which fires right before the swap in the replay harness. The harness then gets the "actual" JSON and runs a comparison. On a mismatch it calls "diff" externally. Currently the diff call is hard-coded to work on Linux only. Note that when running validation it's important to replay on SwiftShader since that's what we use to retrace. Bug: angleproject:5133 Change-Id: Icbf0031d07be8bd916607c537dec235f9a512c43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066008 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 2b86e2d6 2021-07-19T10:30:57 GN: Update dcheck/assert conditions. In preparation for a Chromium change that makes dchecks enabled by default in Release builds, we'll keep ASSERT disabled in Release by default. We add a new flag 'angle_assert_always_on' for controlling ANGLE ASSERT behaviour. Also slightly refactors the direct SPIR-V generation GN. Chromium CL: https://crrev.com/c/2893204 Bug: chromium:1225701 Change-Id: I01a6def28d7c21e771e9800889a6b9c274972de2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035447 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 634d156f 2021-07-08T12:42:21 TracePerfTests: Add ScreenShotFrame option Allows the user to specify a frame to capture instead of defaulting to the first one. Usage: --screenshot-frame <frame> Bug: angleproject:4615 Change-Id: I000ee17aa9b3019188816aa6203f3266b39155b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016356 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 913bc473 2021-05-07T11:37:01 Tests: Add --fixed-test-time option Similar to --max-steps-performed, don't do any calibration and just run flat out for a fixed amount of time. Also rename --test-time to --max-trial-time to reflect what the parameter actually does, limiting each trial to a ceiling. Also remove a redundant check in doRunLoop. Test: angle_perftests --fixed-test-time 20 Test: angle_perftests --max-trial-time 2 Bug: angleproject:5935 Change-Id: I854799a734cd6c019399f5a1444b4ef5f659ddf4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2878937 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Charlie Lao 4340fcfa 2021-04-02T13:59:17 Vulkan: Add command option to run app traces with minimum GPU work This CL interposes the draw call API entries. If enabled by command line option "--minimize-gpu-work", it will override all draw calls to render a single GL_POINT instead. It forces view port and scissor size to 1x1. It forces all data copy to 1 texel or 1 byte. It ignores glGenerateMipmap call. The goal is to make the frame time reflect the driver CPU performance as much as possible so that we can use it to compare ANGLE vs native GLES on the driver overhead, as well as identifying CPU hot spot. Bug: b/184766477 Change-Id: Ie8b5b585e0ed55320fed7863da37cce419acc65f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802858 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4323ed0c 2020-11-06T12:45:12 Perf Tests: Fix test time with max steps performed. This lets the default test time be 10 minutes when using a maximum steps value. This will prevent the current 10 second limit from kicking in and aborting. Also changes the --test-time override to be more clearly a calibration time, and adds a new --test-time that lets the user override the actual trial test time. Bug: b/172480147 Change-Id: I630aa8d3c9e118bb5f0100b38f37e717e12f3538 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523371 Reviewed-by: Paul Thomson <paulthomson@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill af16c638 2020-11-06T09:50:51 Perf Tests: Add --max-steps-performed argument. This will limit the total number of steps run in the test. When using this argument we skip warmp & calibration. Renames the prior --steps argument to --steps-per-trial. Bug: b/172480147 Change-Id: Iae7cce26d66ca0bbdb21c1f511a6bfa246bd204e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519404 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 51ff0d05 2020-10-16T11:54:04 Trace Tests: Add vsync-limited mode with a GPU timer. Local testing on Linux shows that ANGLE and native have the same wall-time, and ANGLE has a 10 ms vs native 6 ms GPU time. Bug: angleproject:5183 Change-Id: I26da678b984af916bfb40e1db6416f5df4f85c08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2480782 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ecbac31c 2020-10-16T10:36:06 Perf Tests: Add offscreen mode. This lets the trace perf tests run configurable number of frames within a single swap. The offscreen config is similar to how gfxbench works. It renders to a user FBO (by overriding calls to BindFramebuffer) and then composits multiple frames into the real backbuffer. This allows us to get a perf measurement with less overhead from composition and display. Adds emulation for some APIs that operate on Framebuffers like BindFramebuffer, Invalidate, DrawBuffers and ReadBuffer. Bug: angleproject:4845 Change-Id: I1044c1d52c82f1c215a68a6c46d74c52ed0f3d2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300207 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill a22a19a4 2020-10-04T13:16:46 Add a --no-finish option to the perf tests. We can use this to re-capture replays. Bug: angleproject:5134 Change-Id: I765e0bbb66cfdd822ffa981f2b5533157d024cac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449161 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill f8e5b97e 2020-09-28T23:31:41 Additional perf test cleanup & functionality. Adds several new command line arguments and documents all args in the README. Changes the trace tests to output milliseconds. Bug: b/169600938 Change-Id: Ie8c7840a6a8958951992c806979dde6dc7d8a709 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2438194 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill bda2205d 2020-09-17T14:37:25 Traces: Move up from tests/perf_tests/ to tests/. The trace tests aren't strictly for performance. Since we'll be using them for correctenss testing as well it makes sense to move them out of the perf_tests/ folder. Also renames RestrictedTraceTests.md to README.md so it'll load automatically in gitiles. Bug: angleproject:4090 Bug: b/168049670 Change-Id: I8be9f1d831489a9abf534d049a93441687850142 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416913 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 080d711b 2020-01-08T13:04:44 Tests: Add a perf test using traces This test will load traces and cycle through a set of frames. The new tests are: TracePerfTest.Run/gl_trex_200_210 TracePerfTest.Run/gl_trex_800_810 TracePerfTest.Run/gl_trex_900_910 TracePerfTest.Run/gl_trex_1300_1310 To download the traces, you must be granted access and authenticate with the cloud. See the steps in RestrictedTraces.md for this. Then add the following to the end of your .gclient file: "custom_vars": { "checkout_angle_internal":"True" }, And run `glcient runhooks`. To enable building the test, add the following GN arg: build_angle_trace_perf_tests = true See the new markdown document for ways to execute the tests. Bug: angleproject:3630 Change-Id: Ic25cd94fb36b35fcf187e88d3bf9548c65f59755 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1949605 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi f576a708 2019-02-04T16:52:12 Add glmark2 to angle_perftests Bug: angleproject:3125 Change-Id: I9242743c6b5c6e18d0a23ff853ef6b9b370865a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1452956 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill ac6d90ea 2018-08-21T13:10:36 Add more test param documentation to perf tests. Also add links from other pages. Bug: angleproject:1944 Change-Id: I344ce075973bd45942d52b819385cb74a5a073ca Reviewed-on: https://chromium-review.googlesource.com/1183629 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ea926a36 2018-08-10T15:22:30 Add angle_perftests README file. Bug: angleproject:1944 Change-Id: I93f363dc5fb6096baec01584bbd2fb525a84909c Reviewed-on: https://chromium-review.googlesource.com/1171502 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>