diff options
author | Haibo Huang <hhb@google.com> | 2020-09-10 20:58:55 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-10 20:58:55 +0000 |
commit | b4855e3648c4087ed68a193986f2c41ab93de680 (patch) | |
tree | 591ff81464b0d795b61d5c5d0712e94197c4ecc6 /bindings/python/google_benchmark/example.py | |
parent | c6f6eed85bed50021278203fb2dfb5c7c9f6f0f2 (diff) | |
parent | d7378813677f3f19a668f8480e596467f27f2790 (diff) | |
download | google-benchmark-b4855e3648c4087ed68a193986f2c41ab93de680.tar.gz |
Upgrade google-benchmark to beb360d03e2a1a2673d9c2cf408c13b69fdb5627 am: daca24e319 am: c4f8afab29 am: d737881367
Original change: https://android-review.googlesource.com/c/platform/external/google-benchmark/+/1423976
Change-Id: Ia6b56379e278278c739ae1c9e012a106a9827238
Diffstat (limited to 'bindings/python/google_benchmark/example.py')
-rw-r--r-- | bindings/python/google_benchmark/example.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bindings/python/google_benchmark/example.py b/bindings/python/google_benchmark/example.py index e968462..0dead75 100644 --- a/bindings/python/google_benchmark/example.py +++ b/bindings/python/google_benchmark/example.py @@ -25,24 +25,24 @@ import google_benchmark as benchmark @benchmark.register def empty(state): - while state: - pass + while state: + pass @benchmark.register def sum_million(state): - while state: - sum(range(1_000_000)) + while state: + sum(range(1_000_000)) @benchmark.register def skipped(state): - if True: # Test some predicate here. - state.skip_with_error('some error') - return # NOTE: You must explicitly return, or benchmark will continue. + if True: # Test some predicate here. + state.skip_with_error('some error') + return # NOTE: You must explicitly return, or benchmark will continue. - ... # Benchmark code would be here. + # Benchmark code would be here. if __name__ == '__main__': - benchmark.main() + benchmark.main() |