diff --git a/atproto/syntax/bench_test.go b/atproto/syntax/bench_test.go new file mode 100644 index 00000000..ebcee1f2 --- /dev/null +++ b/atproto/syntax/bench_test.go @@ -0,0 +1,18 @@ +package syntax + +import "testing" + +func BenchmarkParseURI(b *testing.B) { + for b.Loop() { + _, _ = ParseURI("https://example.com/path?query=1#fragment") + } + b.ReportAllocs() +} + +func BenchmarkTIDClock_Next(b *testing.B) { + clock := NewTIDClock(1) + for b.Loop() { + _ = clock.Next() + } + b.ReportAllocs() +}