MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / BenchmarkAuthToken_IsValid

Function BenchmarkAuthToken_IsValid

pkg/api/auth_test.go:528–539  ·  view source on GitHub ↗

Benchmark tests.

(b *testing.B)

Source from the content-addressed store, hash-verified

526
527// Benchmark tests.
528func BenchmarkAuthToken_IsValid(b *testing.B) {
529 token := &AuthToken{
530 Ticket: "benchmark-ticket",
531 ExpiresAt: time.Now().Add(1 * time.Hour),
532 }
533
534 b.ResetTimer()
535
536 for i := 0; i < b.N; i++ {
537 _ = token.IsValid()
538 }
539}
540
541func BenchmarkAuthManager_GetValidToken_Cached(b *testing.B) {
542 httpClient := &HTTPClient{baseURL: "https://test.example.com"}

Callers

nothing calls this directly

Calls 1

IsValidMethod · 0.95

Tested by

no test coverage detected