Skip to content

[syserror] Add linuxerr package.#5979

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test/cl373453188
May 18, 2021
Merged

[syserror] Add linuxerr package.#5979
copybara-service[bot] merged 1 commit intomasterfrom
test/cl373453188

Conversation

@copybara-service
Copy link

[syserror] Add linuxerr package.

Add linuxerr package to replace syserror and syserr errors. This is done
to improve performance comparing/returning errors to on par with
syscall.Errno.

The below linuxerr_test (formerly syserror_test) shows linuxerr.Error
on par with unix.Error (syscall.Errno) as desired.

BenchmarkAssignErrno
BenchmarkAssignErrno-6 1000000000 0.6291 ns/op
BenchmarkLinuxerrAssignError
BenchmarkLinuxerrAssignError-6 1000000000 0.5808 ns/op
BenchmarkAssignSyserrorError
BenchmarkAssignSyserrorError-6 1000000000 0.6188 ns/op
BenchmarkCompareErrno
BenchmarkCompareErrno-6 1000000000 0.5041 ns/op
BenchmarkCompareLinuxerrError
BenchmarkCompareLinuxerrError-6 1000000000 0.4660 ns/op
BenchmarkCompareSyserrorError
BenchmarkCompareSyserrorError-6 309026907 3.386 ns/op
BenchmarkSwitchErrno
BenchmarkSwitchErrno-6 722253750 1.440 ns/op
BenchmarkSwitchLinuxerrError
BenchmarkSwitchLinuxerrError-6 709108542 1.453 ns/op
BenchmarkSwitchSyserrorError
BenchmarkSwitchSyserrorError-6 106331331 11.21 ns/op

@copybara-service copybara-service bot added the exported Issue was exported automatically label May 12, 2021
@google-cla google-cla bot added the cla: yes CLA has been signed label May 12, 2021
@copybara-service copybara-service bot force-pushed the test/cl373453188 branch 4 times, most recently from 1690ecc to c535a5d Compare May 18, 2021 21:11
Add linuxerr package to replace syserror and syserr errors. This is done
to improve performance comparing/returning errors to on par with
syscall.Errno.

The below linuxerr_test (formerly syserror_test) shows linuxerr.Error
on par with unix.Error (syscall.Errno) as desired.

BenchmarkAssignErrno
BenchmarkAssignErrno-6                  1000000000               0.6291 ns/op
BenchmarkLinuxerrAssignError
BenchmarkLinuxerrAssignError-6          1000000000               0.5808 ns/op
BenchmarkAssignSyserrorError
BenchmarkAssignSyserrorError-6          1000000000               0.6188 ns/op
BenchmarkCompareErrno
BenchmarkCompareErrno-6                 1000000000               0.5041 ns/op
BenchmarkCompareLinuxerrError
BenchmarkCompareLinuxerrError-6         1000000000               0.4660 ns/op
BenchmarkCompareSyserrorError
BenchmarkCompareSyserrorError-6         309026907                3.386 ns/op
BenchmarkSwitchErrno
BenchmarkSwitchErrno-6                  722253750                1.440 ns/op
BenchmarkSwitchLinuxerrError
BenchmarkSwitchLinuxerrError-6          709108542                1.453 ns/op
BenchmarkSwitchSyserrorError
BenchmarkSwitchSyserrorError-6          106331331               11.21 ns/op

PiperOrigin-RevId: 374507431
@copybara-service copybara-service bot merged commit 8ff6694 into master May 18, 2021
@copybara-service copybara-service bot deleted the test/cl373453188 branch May 18, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes CLA has been signed exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant