-
Notifications
You must be signed in to change notification settings - Fork 100
Enable filtering acorn events output to a given time span #1920
Conversation
f8ebd1d
to
3632f1b
Compare
func NewMicroTime(t time.Time) MicroTime { | ||
return MicroTime(metav1.NewMicroTime(t)) | ||
} | ||
|
||
func NowMicro() MicroTime { | ||
return NewMicroTime(time.Now()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Candidates for z
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tylerslaton Possibly. What did you have in mind? a generic implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of just porting these over for discoverability purposes.
257806b
to
0935a22
Compare
4f17997
to
0b65a61
Compare
Pushed some changes to address @g-linville's feedback (see #1920 (comment)). Requesting re-reviews |
Add two new options to the `acorn events` subcommand: - `--since` will determine the start of the time span; excludes events observed before this point when provided - `--until` will determine the end of the time span; excludes events observed after this point when provided Each option accepts a single argument; arguments can be Unix timestamps, date formatted timestamps, or Go duration strings(relative to system time). Signed-off-by: Nick Hale <[email protected]>
Co-authored-by: Tyler Slaton <[email protected]> Signed-off-by: Nick Hale <[email protected]>
Add support for unix timestamp strings when parsing since and until. Signed-off-by: Nick Hale <[email protected]>
Co-authored-by: Grant Linville <[email protected]> Signed-off-by: Nick Hale <[email protected]>
87c50fc
to
139d7c8
Compare
Just pushed a simple rebase. Conflict was small and contained. Tests are passing, so I don't think this requires another round of review. Merging. |
Add two new options to the
acorn events
subcommand:--since
will determine the start of the time span; excludes eventsobserved before this point when provided
--until
will determine the end of the time span; excludes eventsobserved after this point when provided
Each option accepts a single argument; arguments can be Unix timestamps,
date formatted timestamps, or Go duration strings(relative to system time).
Addresses #1805