mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
fix(trace): cpu_percent is omitted when no CPU was sampled
The replay UI already declared it optional, so a web run's steps recording a zero per step were the only thing claiming a reading.
This commit is contained in:
1 parent
1fb910e0a2
commit
28402bda7b
4 files changed
+14
-7
No files matched your search
@@ -104,9 +104,11 @@ type ExtractorChange struct {
|
||||
}
|
||||
|
||||
type Metrics struct {
|
||||
CPUPercent float64 `json:"cpu_percent"`
|
||||
HeapBytes int64 `json:"heap_bytes,omitempty"`
|
||||
TotalMemoryBytes int64 `json:"total_memory_bytes,omitempty"`
|
||||
// CPUPercent is omitted when the driver samples no CPU, so a web run's
|
||||
// steps do not each record a zero the sampler never took.
|
||||
CPUPercent *float64 `json:"cpu_percent,omitempty"`
|
||||
HeapBytes int64 `json:"heap_bytes,omitempty"`
|
||||
TotalMemoryBytes int64 `json:"total_memory_bytes,omitempty"`
|
||||
}
|
||||
|
||||
// The three producers an action can come from. The spec's setup drives the app
|
||||
|
||||
Reference in new issue
Block a user