From e4e84c7aad9fb887150ba1fcfaf64463765419c9 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Fri, 7 Aug 2026 17:17:32 +0400 Subject: javascript port --- snowflake_bench_test.go | 65 ------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 snowflake_bench_test.go (limited to 'snowflake_bench_test.go') diff --git a/snowflake_bench_test.go b/snowflake_bench_test.go deleted file mode 100644 index ffad399..0000000 --- a/snowflake_bench_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package snowflake - -import "testing" - -var benchmarkSnowflake = New() - -func BenchmarkNew(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - New() - } -} - -func BenchmarkSnowflake_String(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkSnowflake.String() - } -} - -func BenchmarkFromString(b *testing.B) { - s := benchmarkSnowflake.String() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - FromString(s) - } -} - -func BenchmarkSnowflake_Hex(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkSnowflake.Hex() - } -} - -func BenchmarkFromHex(b *testing.B) { - h := benchmarkSnowflake.Hex() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - FromHex(h) - } -} - -func BenchmarkMarshalJSON(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkSnowflake.MarshalJSON() - } -} - -func BenchmarkMarshalText(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkSnowflake.MarshalText() - } -} - -func BenchmarkValue(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkSnowflake.Value() - } -} -- cgit v1.3.1