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

Function BenchmarkInMemoryRefreshTokenStore_Delete

store/memory_test.go:441–457  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

439}
440
441func BenchmarkInMemoryRefreshTokenStore_Delete(b *testing.B) {
442 store := NewInMemoryRefreshTokenStore()
443 user := &User{ID: "123", Username: "testuser"}
444 expiry := time.Now().Add(time.Hour)
445
446 // Pre-populate with tokens
447 for i := 0; i < b.N; i++ {
448 token := fmt.Sprintf("token%d", i)
449 _ = store.Set(context.Background(), token, user, expiry)
450 }
451
452 b.ResetTimer()
453 for i := 0; i < b.N; i++ {
454 token := fmt.Sprintf("token%d", i)
455 _ = store.Delete(context.Background(), token)
456 }
457}

Callers

nothing calls this directly

Calls 3

SetMethod · 0.95
DeleteMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…