Reformat code
This commit is contained in:
@@ -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],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user