File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,18 @@ package event
2020
2121import (
2222 "fmt"
23+ "net"
24+ "reflect"
25+ "sort"
26+ "strings"
27+ "time"
28+
2329 "github.com/rabbitstack/fibratus/pkg/fs"
2430 "github.com/rabbitstack/fibratus/pkg/network"
2531 "github.com/rabbitstack/fibratus/pkg/util/key"
2632 "github.com/rabbitstack/fibratus/pkg/util/va"
2733 "golang.org/x/text/cases"
2834 "golang.org/x/text/language"
29- "net"
30- "reflect"
31- "sort"
32- "strings"
33- "time"
3435
3536 "github.com/rabbitstack/fibratus/pkg/errors"
3637 "github.com/rabbitstack/fibratus/pkg/event/params"
@@ -99,6 +100,12 @@ type Param struct {
99100 Enum ParamEnum `json:"enum"`
100101}
101102
103+ // IsNumber determines if the parameter stores the integer value type.
104+ func (p Param ) IsNumber () bool {
105+ return p .Type == params .Int8 || p .Type == params .Int16 || p .Type == params .Int32 || p .Type == params .Int64 ||
106+ p .Type == params .Uint8 || p .Type == params .Uint16 || p .Type == params .Uint32 || p .Type == params .Uint64
107+ }
108+
102109// CaptureType returns the event type saved inside the capture file.
103110// Captures usually override the type of the parameter to provide
104111// consistent replay experience. For example, the file path param
You can’t perform that action at this time.
0 commit comments