Skip to content

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

@andrewkroh

Description

@andrewkroh

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%

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions