Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of github.com/pkg/errors #99

Closed
andrewkroh opened this issue Feb 2, 2022 · 0 comments · Fixed by #101
Closed

Remove usage of github.com/pkg/errors #99

andrewkroh opened this issue Feb 2, 2022 · 0 comments · Fixed by #101
Assignees

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Feb 2, 2022

github.com/pkg/errors is no longer maintained and has been archived. This library should no longer depend on that package. If required the minimum version of Go can be incremented as well.

A secondary benefit will be performance. The warnings in aucoalesce take a lot of time due to the stack trace capturing. On a related note I'm proposing to make warnings configurable in #100.

func BenchmarkCoalesceMessages(b *testing.B) {
	events := readEventsFromYAML(b, "testdata/rhel-7-linux-3.10.0.yaml")

	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		_, err := CoalesceMessages(events[i%len(events)].messages)
		if err != nil {
			b.Fatal(err)
		}
	}
}
$ benchcmp before.txt after.txt
benchmark old ns/op new ns/op delta
BenchmarkCoalesceMessages-12 4956 3444 -30.51%

benchmark old allocs new allocs delta
BenchmarkCoalesceMessages-12 17 14 -17.65%

benchmark old bytes new bytes delta
BenchmarkCoalesceMessages-12 2943 2487 -15.49%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants