MCPcopy
hub / github.com/segmentio/ksuid / BenchmarkSort

Function BenchmarkSort

ksuid_test.go:362–374  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

360}
361
362func BenchmarkSort(b *testing.B) {
363 ids1 := [101]KSUID{}
364 ids2 := [101]KSUID{}
365
366 for i := range ids1 {
367 ids1[i] = New()
368 }
369
370 for i := 0; i != b.N; i++ {
371 ids2 = ids1
372 Sort(ids2[:])
373 }
374}
375
376func BenchmarkNew(b *testing.B) {
377 b.Run("with crypto rand", func(b *testing.B) {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
SortFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…