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

Create an assertZeroAllocs test helper #4964

Closed
MrAlias opened this issue Feb 22, 2024 · 2 comments
Closed

Create an assertZeroAllocs test helper #4964

MrAlias opened this issue Feb 22, 2024 · 2 comments
Assignees
Labels
area:logs Part of OpenTelemetry logs

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Feb 22, 2024

func assertZeroAllocs(t *testing.T, f func(), msgAndArgs ...interface{}) {
	t.Helper()
	assert.Equal(t, 0.0, testing.AllocsPerRun(5, f, msgAndArgs...)
}

I suggest doing it as a separate PR so that more people also review this refactoring (and merge this PR as it is).

Originally posted by @pellared in #4957 (comment)

@MrAlias MrAlias added the area:logs Part of OpenTelemetry logs label Feb 22, 2024
@MrAlias

This comment was marked as resolved.

@pellared
Copy link
Member

Closing per #4965 (review)

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants