Reformat code

This commit is contained in:
Asger F
2024-11-22 11:32:29 +01:00
parent 20f6e3d45c
commit 558d957eb7

View File

@@ -413,29 +413,31 @@ function ComparePerformanceWithData(props: {
const hasCacheHitMismatch = useRef<boolean>(false);
const rows = useMemo(() => Array.from(nameSet)
.map((name) => {
const before = from.getTupleCountInfo(name);
const after = to.getTupleCountInfo(name);
const beforeValue = metric.get(before);
const afterValue = metric.get(after);
if (beforeValue === afterValue) {
return undefined!;
}
if (
before.absentReason === AbsentReason.CacheHit ||
after.absentReason === AbsentReason.CacheHit
) {
hasCacheHitMismatch.current = true;
if (hideCacheHits) {
return undefined!;
}
}
const diff = afterValue - beforeValue;
return { name, before, after, diff };
})
.filter((x) => !!x)
.sort(getSortOrder(sortOrder)),
const rows = useMemo(
() =>
Array.from(nameSet)
.map((name) => {
const before = from.getTupleCountInfo(name);
const after = to.getTupleCountInfo(name);
const beforeValue = metric.get(before);
const afterValue = metric.get(after);
if (beforeValue === afterValue) {
return undefined!;
}
if (
before.absentReason === AbsentReason.CacheHit ||
after.absentReason === AbsentReason.CacheHit
) {
hasCacheHitMismatch.current = true;
if (hideCacheHits) {
return undefined!;
}
}
const diff = afterValue - beforeValue;
return { name, before, after, diff };
})
.filter((x) => !!x)
.sort(getSortOrder(sortOrder)),
[nameSet, from, to, metric, hideCacheHits, sortOrder],
);