This commit is contained in:
2024-12-04 16:40:52 -06:00
commit adba4e25dc
10 changed files with 489 additions and 0 deletions

28
lib/types.go Normal file
View File

@ -0,0 +1,28 @@
package lib
import (
"sync"
"time"
)
type PerformanceMetrics struct {
Mu sync.Mutex
TotalRequests int32
TotalResponses int32
TotalLatency time.Duration
MaxLatency time.Duration
MinLatency time.Duration
ResponseCounters map[int]int32
}
type RequestError struct {
Verb string
URL string
Err error
}
type RequestPattern struct {
Verb string
Percentage float64
Sequence int
}