benchmarking

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectFuncToComplete

func ExpectFuncToComplete(f func(), runtimeThresholdInSeconds float64)

ONLY COMPILES ON LINUX most often you will want to wrap the code being tested (i.e., f()) in a for loop to get more sizeable readings. use this function over built-in benchmarker (https://onsi.github.io/ginkgo/#benchmark_tests) to measure time using the OS user-time specific to the executing thread. This _should_ help with noisy neighbors in ci/locally.

other things to note while benchmarking:

  • I've noticed the google cloudbuild hardware matters a lot, using nonstandard hardware (e.g. `N1_HIGHCPU_8`) has helped improve reliability of benchmarks
  • we could still explore running tests with nice and/or ionice
  • could also further explore running the tests with docker flags --cpu-shares set

func TimeForFuncToComplete added in v0.21.18

func TimeForFuncToComplete(f func()) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL