Skip to content

Commit

Permalink
fix: max amount of rows, reorder columns
Browse files Browse the repository at this point in the history
  • Loading branch information
nahoc committed Apr 29, 2024
1 parent 1d40060 commit 5971cac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
12 changes: 8 additions & 4 deletions web/apps/benchmarks-and-reports/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import withBundleAnalyzer from "@next/bundle-analyzer";
import { latestVersion } from "./src/versions.js";

/** @type {import("next").NextConfig} */
const config = {
let config = {
eslint: {
ignoreDuringBuilds: true,
},
Expand Down Expand Up @@ -31,6 +31,10 @@ const config = {
},
};

export default withBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
})(config);
if (process.env.ANALYZE === "true") {
config = withBundleAnalyzer({
enabled: true,
})(config);
}

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ import type { DatasheetTableSchema } from "./datasheet-table-schema";
const columnHelper = createColumnHelper<DatasheetTableSchema>();

export const datasheetTableColumns = [
{
accessorKey: "total_cycles",
header: ({ column }) => <TableColumnHeader column={column} title="Cycles" />,
cell: ({ row }) => (
<div className="font-mono">{`${(row.original.total_cycles ?? row.original.cycles) / 1024}k`}</div>
),
},
columnHelper.accessor("name", {
header: ({ column }) => <TableColumnHeader column={column} title="Name" />,
cell: (info) => <div className="font-mono">{info.getValue() ?? "-"}</div>,
Expand All @@ -25,10 +18,13 @@ export const datasheetTableColumns = [
header: ({ column }) => <TableColumnHeader column={column} title="Hash Function" />,
cell: (info) => <div className="font-mono">{info.getValue() ?? "-"}</div>,
}),
columnHelper.accessor("seal", {
header: ({ column }) => <TableColumnHeader column={column} title="Seal" />,
cell: (info) => <div className="font-mono">{formatBytes(info.getValue()) ?? "-"}</div>,
}),
{
accessorKey: "total_cycles",
header: ({ column }) => <TableColumnHeader column={column} title="Cycles" />,
cell: ({ row }) => (
<div className="font-mono">{`${(row.original.total_cycles ?? row.original.cycles) / 1024}k`}</div>
),
},
columnHelper.accessor("duration", {
header: ({ column }) => <TableColumnHeader column={column} title="Duration" />,
cell: (info) => <div className="font-mono">{formatDuration(info.getValue()) ?? "-"}</div>,
Expand All @@ -37,6 +33,10 @@ export const datasheetTableColumns = [
header: ({ column }) => <TableColumnHeader column={column} title="RAM" />,
cell: (info) => <div className="font-mono">{formatBytes(info.getValue()) ?? "-"}</div>,
}),
columnHelper.accessor("seal", {
header: ({ column }) => <TableColumnHeader column={column} title="Seal" />,
cell: (info) => <div className="font-mono">{formatBytes(info.getValue()) ?? "-"}</div>,
}),
{
accessorKey: "throughput",
header: ({ column }) => <TableColumnHeader column={column} title="Speed" />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { type ReactNode, useState } from "react";
import { TableToolbar } from "shared/client/table/table-toolbar";
import { tableFuzzyFilter } from "shared/utils/table-fuzzy-filter";

const MAX_AMOUNT_OF_ROWS = 5;
const MAX_AMOUNT_OF_ROWS = 25;

export function DatasheetTable<TData, TValue>({
title,
Expand Down

0 comments on commit 5971cac

Please sign in to comment.