(b *testing.B)
| 421 | } |
| 422 | |
| 423 | func BenchmarkInMemoryRefreshTokenStore_Get(b *testing.B) { |
| 424 | store := NewInMemoryRefreshTokenStore() |
| 425 | user := &User{ID: "123", Username: "testuser"} |
| 426 | expiry := time.Now().Add(time.Hour) |
| 427 | |
| 428 | // Pre-populate with tokens |
| 429 | for i := 0; i < 1000; i++ { |
| 430 | token := fmt.Sprintf("token%d", i) |
| 431 | _ = store.Set(context.Background(), token, user, expiry) |
| 432 | } |
| 433 | |
| 434 | b.ResetTimer() |
| 435 | for i := 0; i < b.N; i++ { |
| 436 | token := fmt.Sprintf("token%d", i%1000) |
| 437 | _, _ = store.Get(context.Background(), token) |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | func BenchmarkInMemoryRefreshTokenStore_Delete(b *testing.B) { |
| 442 | store := NewInMemoryRefreshTokenStore() |
nothing calls this directly
no test coverage detected
searching dependent graphs…