Auto merge of #18272 - mateon1:fix/profile-sorted-assert, r=emilio
Auto merge of #18272 - mateon1:fix/profile-sorted-assert, r=emilio

Correct "is sorted" check in profile statistics

<!-- Please describe your changes on the following line: -->
Correct the debug_assert check for whether or not statistics collected by the --profile flag are sorted.
I'm not sure how I could add a test for this change, and whether that is necessary.

I also wonder if it makes sense to replace the sort_by calls (currently using explicit comparisons) in this file with something like
```
data.sort_by(|a, b| a.partial_cmp(b).expect("no NaN in collected statistics"))
```

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18270 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18272)
<!-- Reviewable:end -->

eddyb/servo,szeged/servo,ConnorGBrewster/servo,larsbergstrom/servo,dsandeephegde/servo,pyfisch/servo,DominoTree/servo,peterjoel/servo,saneyuki/servo,CJ8664/servo,KiChjang/servo,ConnorGBrewster/servo,sadmansk/servo,avadacatavra/servo,mbrubeck/servo,paulrouget/servo,notriddle/servo,nnethercote/servo,dati91/servo,cbrewster/servo,jimberlage/servo,eddyb/servo,dati91/servo,notriddle/servo,KiChjang/servo,upsuper/servo,emilio/servo,canaltinova/servo,sadmansk/servo,KiChjang/servo,saneyuki/servo,nnethercote/servo,peterjoel/servo,larsbergstrom/servo,ConnorGBrewster/servo,rnestler/servo,paulrouget/servo,jimberlage/servo,notriddle/servo,SimonSapin/servo,notriddle/servo,notriddle/servo,emilio/servo,anthgur/servo,mattnenterprise/servo,pyfisch/servo,dsandeephegde/servo,peterjoel/servo,pyfisch/servo,upsuper/servo,upsuper/servo,canaltinova/servo,pyfisch/servo,canaltinova/servo,sadmansk/servo,thiagopnts/servo,rnestler/servo,thiagopnts/servo,fiji-flo/servo,szeged/servo,jimberlage/servo,DominoTree/servo,thiagopnts/servo,CJ8664/servo,upsuper/servo,dati91/servo,paulrouget/servo,splav/servo,rnestler/servo,dsandeephegde/servo,paulrouget/servo,SimonSapin/servo,SimonSapin/servo,upsuper/servo,dsandeephegde/servo,dati91/servo,jimberlage/servo,saneyuki/servo,sadmansk/servo,anthgur/servo,sadmansk/servo,nnethercote/servo,pyfisch/servo,cbrewster/servo,splav/servo,saneyuki/servo,cbrewster/servo,saneyuki/servo,eddyb/servo,KiChjang/servo,larsbergstrom/servo,avadacatavra/servo,notriddle/servo,paulrouget/servo,paulrouget/servo,peterjoel/servo,fiji-flo/servo,avadacatavra/servo,mbrubeck/servo,KiChjang/servo,mattnenterprise/servo,eddyb/servo,pyfisch/servo,splav/servo,cbrewster/servo,szeged/servo,cbrewster/servo,anthgur/servo,thiagopnts/servo,pyfisch/servo,szeged/servo,anthgur/servo,saneyuki/servo,szeged/servo,emilio/servo,thiagopnts/servo,ConnorGBrewster/servo,saneyuki/servo,SimonSapin/servo,canaltinova/servo,splav/servo,larsbergstrom/servo,emilio/servo,DominoTree/servo,DominoTree/servo,mbrubeck/servo,nnethercote/servo,pyfisch/servo,ConnorGBrewster/servo,szeged/servo,peterjoel/servo,dsandeephegde/servo,jimberlage/servo,pyfisch/servo,mattnenterprise/servo,emilio/servo,anthgur/servo,nnethercote/servo,DominoTree/servo,larsbergstrom/servo,pyfisch/servo,eddyb/servo,cbrewster/servo,avadacatavra/servo,eddyb/servo,nnethercote/servo,KiChjang/servo,mattnenterprise/servo,SimonSapin/servo,DominoTree/servo,saneyuki/servo,notriddle/servo,canaltinova/servo,saneyuki/servo,mattnenterprise/servo,CJ8664/servo,nnethercote/servo,mbrubeck/servo,splav/servo,splav/servo,canaltinova/servo,dati91/servo,mbrubeck/servo,mattnenterprise/servo,anthgur/servo,DominoTree/servo,dati91/servo,dsandeephegde/servo,splav/servo,mattnenterprise/servo,mbrubeck/servo,thiagopnts/servo,nnethercote/servo,rnestler/servo,avadacatavra/servo,avadacatavra/servo,cbrewster/servo,upsuper/servo,rnestler/servo,larsbergstrom/servo,CJ8664/servo,CJ8664/servo,fiji-flo/servo,notriddle/servo,paulrouget/servo,CJ8664/servo,canaltinova/servo,dsandeephegde/servo,sadmansk/servo,larsbergstrom/servo,canaltinova/servo,DominoTree/servo,fiji-flo/servo,eddyb/servo,KiChjang/servo,emilio/servo,jimberlage/servo,DominoTree/servo,anthgur/servo,szeged/servo,peterjoel/servo,fiji-flo/servo,paulrouget/servo,larsbergstrom/servo,thiagopnts/servo,rnestler/servo,jimberlage/servo,larsbergstrom/servo,cbrewster/servo,peterjoel/servo,SimonSapin/servo,mbrubeck/servo,mbrubeck/servo,splav/servo,CJ8664/servo,emilio/servo,sadmansk/servo,KiChjang/servo,emilio/servo,avadacatavra/servo,nnethercote/servo,KiChjang/servo,larsbergstrom/servo,ConnorGBrewster/servo,eddyb/servo,fiji-flo/servo,saneyuki/servo,thiagopnts/servo,szeged/servo,peterjoel/servo,anthgur/servo,SimonSapin/servo,rnestler/servo,dati91/servo,splav/servo,emilio/servo,SimonSapin/servo,emilio/servo,fiji-flo/servo,nnethercote/servo,ConnorGBrewster/servo,jimberlage/servo,KiChjang/servo,paulrouget/servo,notriddle/servo,mattnenterprise/servo,rnestler/servo,upsuper/servo,CJ8664/servo,DominoTree/servo,dati91/servo,jimberlage/servo,szeged/servo,paulrouget/servo,notriddle/servo,peterjoel/servo,sadmansk/servo,upsuper/servo,fiji-flo/servo,ConnorGBrewster/servo,splav/servo,avadacatavra/servo,peterjoel/servo,dsandeephegde/servo,szeged/servo