Open lars-t-hansen opened 2 months ago
The best idea I've had so far is that the field list should imply a sort order, and output is always sorted according to all the fields. This is not a pancea: field selection could be such that two records are indistinguishable. So the bigger hammer is to sort according to the requested fields, and then sort according to all the other fields, in some predictable order.
There are two variations I've observed:
jobs
for exampleThe first one is more a matter of taste than anything, but it comes down to improving the predicate used by sortableSummaries in jobs/print.go. For testing purposes we can pass the output through
sort
and we'll have something more stable.The second one is more worrisome. Here's the diff from two adjacent runs of
jobs
(the outputs have been post-sorted to avoid the first problem):(Command:
sonalyze jobs -data-dir ~/sonar/data/fox.educloud.no -u - -from 2024-05-01 -to 2024-06-30
)There's usually a small difference - one ULP - in the memory readings. This is probably some kind of numeric instability, which may in turn come down to the order in which records are processed, but it would be good to verify that, and if so, to fix it.