summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-09-15 15:57:38 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-15 15:59:25 -0700
commit8b15effd9ec6091feb9ec554ebe38cc02e765560 (patch)
tree323785581a4830744fdb2753063b5031cd7216db /test/runtimes
parent456c6c33e104e7421a5a815bba69d46b289ae724 (diff)
Improve syserror_test.
- It's very difficult to prevent returnErrnoAsError and returnError from being optimized out. Instead, replace BenchmarkReturn* with BenchmarkAssign*, which store to globalError. - Compare to a non-nil globalError in BenchmarkCompare* and BenchmarkSwitch*. New results: BenchmarkAssignErrno BenchmarkAssignErrno-12 1000000000 0.615 ns/op BenchmarkAssignError BenchmarkAssignError-12 1000000000 0.626 ns/op BenchmarkCompareErrno BenchmarkCompareErrno-12 1000000000 0.522 ns/op BenchmarkCompareError BenchmarkCompareError-12 1000000000 3.54 ns/op BenchmarkSwitchErrno BenchmarkSwitchErrno-12 1000000000 1.45 ns/op BenchmarkSwitchError BenchmarkSwitchError-12 536315757 10.9 ns/op PiperOrigin-RevId: 331875387
Diffstat (limited to 'test/runtimes')
0 files changed, 0 insertions, 0 deletions