2import { BenchmarkResult } from "../../../types";
3import { formatNumber, formatSize } from "../utils/formatters";
eacabc8test real dataJeremy Magland 4
5const columnHelper = createColumnHelper<BenchmarkResult>();
7export const columns = [
9 header: "Dataset",
10 cell: (info) => info.getValue(),
13 header: "Algorithm",
14 cell: (info) => info.getValue(),
17 header: "Compression Ratio",
18 cell: (info) => `${formatNumber(info.getValue())}x`,
20 const a = rowA.original.compression_ratio;
21 const b = rowB.original.compression_ratio;
22 return a - b;
23 },
24 }),
26 header: "Encode Time (s)",
27 cell: (info) => formatNumber(info.getValue(), 4),
29 const a = rowA.original.encode_time;
30 const b = rowB.original.encode_time;
31 return a - b;
32 },
33 }),
35 header: "Decode Time (s)",
36 cell: (info) => formatNumber(info.getValue(), 4),
38 const a = rowA.original.decode_time;
39 const b = rowB.original.decode_time;
40 return a - b;
41 },
42 }),
44 header: "Encode Speed (MB/s)",
45 cell: (info) => formatNumber(info.getValue()),
47 const a = rowA.original.encode_mb_per_sec;
48 const b = rowB.original.encode_mb_per_sec;
49 return a - b;
50 },
51 }),
53 header: "Decode Speed (MB/s)",
54 cell: (info) => formatNumber(info.getValue()),
56 const a = rowA.original.decode_mb_per_sec;
57 const b = rowB.original.decode_mb_per_sec;
58 return a - b;
59 },
60 }),
62 header: "Original Size",
63 cell: (info) => formatSize(info.getValue()),
65 const a = rowA.original.original_size;
66 const b = rowB.original.original_size;
67 return a - b;
68 },
69 }),
71 header: "Compressed Size",
72 cell: (info) => formatSize(info.getValue()),
74 const a = rowA.original.compressed_size;
75 const b = rowB.original.compressed_size;
76 return a - b;
77 },
78 }),
79];