(b *testing.B)
| 60 | } |
| 61 | |
| 62 | func BenchmarkToken_SigningString(b *testing.B) { |
| 63 | t := &jwt.Token{ |
| 64 | Method: jwt.SigningMethodHS256, |
| 65 | Header: map[string]any{ |
| 66 | "typ": "JWT", |
| 67 | "alg": jwt.SigningMethodHS256.Alg(), |
| 68 | }, |
| 69 | Claims: jwt.RegisteredClaims{}, |
| 70 | } |
| 71 | b.Run("BenchmarkToken_SigningString", func(b *testing.B) { |
| 72 | b.ResetTimer() |
| 73 | b.ReportAllocs() |
| 74 | for i := 0; i < b.N; i++ { |
| 75 | _, _ = t.SigningString() |
| 76 | } |
| 77 | }) |
| 78 | } |
nothing calls this directly
no test coverage detected