microsoft-authentication-library-for-go icon indicating copy to clipboard operation
microsoft-authentication-library-for-go copied to clipboard

Performance tests should be Go benchmarks

Open hickford opened this issue 1 year ago • 0 comments

Unit tests should be fast but https://github.com/AzureAD/microsoft-authentication-library-for-go/blob/dev/apps/tests/performance/performance_test.go does performance testing using homegrown . The test runs so long it times out on my computer.

Better would be to use Go's built-in benchmark feature https://pkg.go.dev/testing#hdr-Benchmarks . This has advantages:

There are standard tools for working with benchmark results at https://golang.org/x/perf/cmd. In particular, https://golang.org/x/perf/cmd/benchstat performs statistically robust A/B comparisons.

This would also remove the dependency on github.com/montanaflynn/stats

hickford avatar Jun 26 '23 06:06 hickford