Skip to content

Commit

Permalink
do not set startTime=0
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Nov 4, 2024
1 parent 36cb99a commit a8100c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/model/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func NewRecord(

func Accumulate(r *ebpf.BpfFlowMetrics, src *ebpf.BpfFlowMetrics) {
// time == 0 if the value has not been yet set
if r.StartMonoTimeTs == 0 || r.StartMonoTimeTs > src.StartMonoTimeTs {
if r.StartMonoTimeTs == 0 || (r.StartMonoTimeTs > src.StartMonoTimeTs && src.StartMonoTimeTs != 0) {
r.StartMonoTimeTs = src.StartMonoTimeTs
}
if r.EndMonoTimeTs == 0 || r.EndMonoTimeTs < src.EndMonoTimeTs {
Expand Down

0 comments on commit a8100c4

Please sign in to comment.