Documentation
¶
Overview ¶
Package requeststats measures work attached to one development request. It retains counters and durations only, never SQL, arguments or user data.
Index ¶
- func Middleware(next http.Handler) http.Handler
- type Snapshot
- type Stats
- func (s *Stats) AddBatch()
- func (s *Stats) AddCopy()
- func (s *Stats) AddDatabase(d time.Duration, failed bool)
- func (s *Stats) AddLoad(d time.Duration)
- func (s *Stats) AddPoolWait(d time.Duration)
- func (s *Stats) AddQuery()
- func (s *Stats) AddRender(d time.Duration)
- func (s *Stats) Snapshot() Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Snapshot ¶
type Snapshot struct {
Server, Load, Render, Database, PoolWait time.Duration
Queries, Errors, Batches, Copies int
}
func (Snapshot) ServerTiming ¶
ServerTiming uses durations only for time metrics. Counts use descriptions, so DevTools doesn't present a query count as a fictional duration.
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
func (*Stats) AddPoolWait ¶
Click to show internal directories.
Click to hide internal directories.