Back out "Use stable sort for performance entries"

Summary:
Changelog: [Internal]

Original commit changeset: 77ff0093bead

Original Phabricator Diff: D45142500

Reviewed By: GijsWeterings

Differential Revision: D45161907

fbshipit-source-id: 546d36a8d1f2bf8c8e26279b172f62e303b51dc0
This commit is contained in:
Oleksandr Melnykov
2023-04-20 15:36:16 -07:00
committed by Facebook GitHub Bot
parent 65f5cd7995
commit d77798b270
2 changed files with 2 additions and 28 deletions
@@ -72,7 +72,7 @@ GetPendingEntriesResult PerformanceEntryReporter::popPendingEntries() {
}
// Sort by starting time (or ending time, if starting times are equal)
std::stable_sort(
std::sort(
res.entries.begin(),
res.entries.end(),
[](const RawPerformanceEntry &lhs, const RawPerformanceEntry &rhs) {
@@ -146,10 +146,6 @@ TEST(PerformanceEntryReporter, PerformanceEntryReporterTestReportMeasures) {
reporter.measure("measure3", 0.0, 0.0, 5.0, "mark1");
reporter.measure("measure4", 1.5, 0.0, std::nullopt, std::nullopt, "mark2");
reporter.mark("mark3", 2.0);
reporter.measure("measure5", 2.0, 2.0);
reporter.mark("mark4", 2.0);
auto res = reporter.popPendingEntries();
const auto &entries = res.entries;
@@ -211,29 +207,7 @@ TEST(PerformanceEntryReporter, PerformanceEntryReporterTestReportMeasures) {
0.0,
std::nullopt,
std::nullopt,
std::nullopt},
{"mark3",
static_cast<int>(PerformanceEntryType::MARK),
2.0,
0.0,
std::nullopt,
std::nullopt,
std::nullopt},
{"mark4",
static_cast<int>(PerformanceEntryType::MARK),
2.0,
0.0,
std::nullopt,
std::nullopt,
std::nullopt},
{"measure5",
static_cast<int>(PerformanceEntryType::MEASURE),
2.0,
0.0,
std::nullopt,
std::nullopt,
std::nullopt},
};
std::nullopt}};
ASSERT_EQ(expected, entries);
}