This reverts commit
1764609b8b245323210eab39c4b586291d3a45a5.
Reason for revert: It breaks the dragonfly trybot, in which there are sometimes (non-deterministically) Events with the same timestamp that have to occur in a specific order.
Change-Id: I714e640c6ab5ccb23d5577e8aa98c7716ede7ad2
Reviewed-on: https://go-review.googlesource.com/114356
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
ev.Ts = ts
}
}
- sort.Sort(eventList(events))
+ sort.Stable(eventList(events))
return
}
}
func (l orderEventList) Less(i, j int) bool {
- a, b := l[i].ev, l[j].ev
- if a.Ts != b.Ts {
- return a.Ts < b.Ts
- }
- if a.Type != b.Type {
- return a.Type < b.Type
- }
- if a.P != b.P {
- return a.P < b.P
- }
- if a.G != b.G {
- return a.G < b.G
- }
- return a.Args[0] < b.Args[0]
+ return l[i].ev.Ts < l[j].ev.Ts
}
func (l orderEventList) Swap(i, j int) {