/
command.go
76 lines (62 loc) · 3.28 KB
/
command.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Code generated by cdpgen. DO NOT EDIT.
package profiler
// GetBestEffortCoverageReply represents the return values for GetBestEffortCoverage in the Profiler domain.
type GetBestEffortCoverageReply struct {
Result []ScriptCoverage `json:"result"` // Coverage data for the current isolate.
}
// SetSamplingIntervalArgs represents the arguments for SetSamplingInterval in the Profiler domain.
type SetSamplingIntervalArgs struct {
Interval int `json:"interval"` // New sampling interval in microseconds.
}
// NewSetSamplingIntervalArgs initializes SetSamplingIntervalArgs with the required arguments.
func NewSetSamplingIntervalArgs(interval int) *SetSamplingIntervalArgs {
args := new(SetSamplingIntervalArgs)
args.Interval = interval
return args
}
// StartPreciseCoverageArgs represents the arguments for StartPreciseCoverage in the Profiler domain.
type StartPreciseCoverageArgs struct {
CallCount *bool `json:"callCount,omitempty"` // Collect accurate call counts beyond simple 'covered' or 'not covered'.
Detailed *bool `json:"detailed,omitempty"` // Collect block-based coverage.
AllowTriggeredUpdates *bool `json:"allowTriggeredUpdates,omitempty"` // Allow the backend to send updates on its own initiative
}
// NewStartPreciseCoverageArgs initializes StartPreciseCoverageArgs with the required arguments.
func NewStartPreciseCoverageArgs() *StartPreciseCoverageArgs {
args := new(StartPreciseCoverageArgs)
return args
}
// SetCallCount sets the CallCount optional argument. Collect accurate
// call counts beyond simple 'covered' or 'not covered'.
func (a *StartPreciseCoverageArgs) SetCallCount(callCount bool) *StartPreciseCoverageArgs {
a.CallCount = &callCount
return a
}
// SetDetailed sets the Detailed optional argument. Collect
// block-based coverage.
func (a *StartPreciseCoverageArgs) SetDetailed(detailed bool) *StartPreciseCoverageArgs {
a.Detailed = &detailed
return a
}
// SetAllowTriggeredUpdates sets the AllowTriggeredUpdates optional argument.
// Allow the backend to send updates on its own initiative
func (a *StartPreciseCoverageArgs) SetAllowTriggeredUpdates(allowTriggeredUpdates bool) *StartPreciseCoverageArgs {
a.AllowTriggeredUpdates = &allowTriggeredUpdates
return a
}
// StartPreciseCoverageReply represents the return values for StartPreciseCoverage in the Profiler domain.
type StartPreciseCoverageReply struct {
Timestamp float64 `json:"timestamp"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
}
// StopReply represents the return values for Stop in the Profiler domain.
type StopReply struct {
Profile Profile `json:"profile"` // Recorded profile.
}
// TakePreciseCoverageReply represents the return values for TakePreciseCoverage in the Profiler domain.
type TakePreciseCoverageReply struct {
Result []ScriptCoverage `json:"result"` // Coverage data for the current isolate.
Timestamp float64 `json:"timestamp"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
}
// TakeTypeProfileReply represents the return values for TakeTypeProfile in the Profiler domain.
type TakeTypeProfileReply struct {
Result []ScriptTypeProfile `json:"result"` // Type profile for all scripts since startTypeProfile() was turned on.
}