token_test.go 227 B

123456789101112131415
  1. package server
  2. import "testing"
  3. func BenchmarkTokenConcat(b *testing.B) {
  4. for i := 0; i < b.N; i++ {
  5. _ = token(5) + token(5)
  6. }
  7. }
  8. func BenchmarkTokenLonger(b *testing.B) {
  9. for i := 0; i < b.N; i++ {
  10. _ = token(10)
  11. }
  12. }