2import { BenchmarkResult } from "../../../types";
3import { formatNumber, formatSize } from "../utils/formatters";
eacabc8test real dataJeremy Magland 5
6const columnHelper = createColumnHelper<BenchmarkResult>();
8export const columns = [
10 header: "Dataset",
12 <Link
13 to={`/dataset/${info.getValue()}`}
14 style={{ color: "#2563eb", textDecoration: "none" }}
15 onMouseEnter={(e) =>
16 (e.currentTarget.style.textDecoration = "underline")
17 }
18 onMouseLeave={(e) => (e.currentTarget.style.textDecoration = "none")}
19 >
20 {info.getValue()}
21 </Link>
22 ),
25 header: "Algorithm",
27 <Link
28 to={`/algorithm/${info.getValue()}`}
29 style={{ color: "#2563eb", textDecoration: "none" }}
30 onMouseEnter={(e) =>
31 (e.currentTarget.style.textDecoration = "underline")
32 }
33 onMouseLeave={(e) => (e.currentTarget.style.textDecoration = "none")}
34 >
35 {info.getValue()}
36 </Link>
37 ),
40 header: "Compression Ratio",
43 const a = rowA.original.compression_ratio;
44 const b = rowB.original.compression_ratio;
45 return a - b;
46 },
47 }),
49 header: "Encode Time (s)",
50 cell: (info) => formatNumber(info.getValue(), 4),
52 const a = rowA.original.encode_time;
53 const b = rowB.original.encode_time;
54 return a - b;
55 },
56 }),
58 header: "Decode Time (s)",
59 cell: (info) => formatNumber(info.getValue(), 4),
61 const a = rowA.original.decode_time;
62 const b = rowB.original.decode_time;
63 return a - b;
64 },
65 }),
67 header: "Encode Speed (MB/s)",
68 cell: (info) => formatNumber(info.getValue()),
70 const a = rowA.original.encode_mb_per_sec;
71 const b = rowB.original.encode_mb_per_sec;
72 return a - b;
73 },
74 }),
76 header: "Decode Speed (MB/s)",
77 cell: (info) => formatNumber(info.getValue()),
79 const a = rowA.original.decode_mb_per_sec;
80 const b = rowB.original.decode_mb_per_sec;
81 return a - b;
82 },
83 }),
85 header: "Original Size",
86 cell: (info) => formatSize(info.getValue()),
88 const a = rowA.original.original_size;
89 const b = rowB.original.original_size;
90 return a - b;
91 },
92 }),
94 header: "Compressed Size",
95 cell: (info) => formatSize(info.getValue()),
97 const a = rowA.original.compressed_size;
98 const b = rowB.original.compressed_size;
99 return a - b;
100 },
101 }),
102];