github.com/go-eden/common@v0.1.15-0.20210617133546-059099253264/goid/goid_test.go (about)

     1  package goid
     2  
     3  import "testing"
     4  
     5  func TestGid(t *testing.T) {
     6  	t.Log(Gid())
     7  }
     8  
     9  // BenchmarkGid-12    	267249897	         4.394 ns/op	       0 B/op	       0 allocs/op
    10  func BenchmarkGid(b *testing.B) {
    11  	b.ReportAllocs()
    12  	b.ResetTimer()
    13  	for i := 0; i < b.N; i++ {
    14  		_ = Gid()
    15  	}
    16  }