MCPcopy
hub / github.com/appleboy/gin-jwt / BenchmarkInMemoryRefreshTokenStore_Set

Function BenchmarkInMemoryRefreshTokenStore_Set

store/memory_test.go:411–421  ·  view source on GitHub ↗

Benchmark tests

(b *testing.B)

Source from the content-addressed store, hash-verified

409
410// Benchmark tests
411func BenchmarkInMemoryRefreshTokenStore_Set(b *testing.B) {
412 store := NewInMemoryRefreshTokenStore()
413 user := &User{ID: "123", Username: "testuser"}
414 expiry := time.Now().Add(time.Hour)
415
416 b.ResetTimer()
417 for i := 0; i < b.N; i++ {
418 token := fmt.Sprintf("token%d", i)
419 _ = store.Set(context.Background(), token, user, expiry)
420 }
421}
422
423func BenchmarkInMemoryRefreshTokenStore_Get(b *testing.B) {
424 store := NewInMemoryRefreshTokenStore()

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…