• TypeScript 62.8%
  • CSS 34.2%
  • Nix 2%
  • HTML 0.7%
  • JavaScript 0.3%
Find a file
2026-02-25 13:06:16 +03:00
.github/workflows ci: auto-fix PNPM dependency hash in Nix package 2026-02-10 16:44:02 +03:00
docs docs: elaborate on snapshots feature; fix title alignment 2026-01-23 00:50:29 +03:00
nix build: fix build 2026-02-09 16:14:47 +01:00
public initial commit 2026-01-22 23:01:36 +03:00
src ui: use more precision for comparison percentage 2026-02-01 01:18:36 -05:00
.envrc nix: initial tooling 2026-01-22 23:01:41 +03:00
.gitignore chore: gitignore build result 2026-02-25 20:47:50 +11:00
.prettierignore chore: ignore irrelevant files in eslint config 2026-01-22 23:01:39 +03:00
.prettierrc initial commit 2026-01-22 23:01:36 +03:00
eslint.config.mjs initial commit 2026-01-22 23:01:36 +03:00
flake.lock nix: initial tooling 2026-01-22 23:01:41 +03:00
flake.nix nix: initial tooling 2026-01-22 23:01:41 +03:00
index.html initial commit 2026-01-22 23:01:36 +03:00
LICENSE meta: release under MPL v2.0 2026-01-22 23:01:37 +03:00
package.json chore: bump all dependencies 2026-01-22 23:29:18 +03:00
pnpm-lock.yaml build(deps): Bump ajv from 6.12.6 to 6.14.0 2026-02-23 00:53:19 +00:00
shell.nix nix: initial tooling 2026-01-22 23:01:41 +03:00
tsconfig.json initial commit 2026-01-22 23:01:36 +03:00
vite.config.ts ci: build & deploy to GH pages 2026-01-22 23:26:17 +03:00

nix-evaluator-stats

Lints & Formatting License

Demo

nix-evaluator-stats, or "ns" for short, is a pretty visualiser for the Nix evaluator stats export from NIX_SHOW_STATS and NIX_COUNT_CALLS invocations. It takes the resulting JSON data from your Nix invocation with the relevant variables, and provides a pretty dashboard-like visual with the ability to compare your "snapshots" of benchmarks. Besides looking nice, it is helpful in collecting statistics about your Nix commands and tracking performance regressions in subsequent exports.

Usage

Usage instructions are provided in the initial page. Simply navigate to the site and provide the JSON export (or a file) to render the statistics. The number of rendered fields might differ based on your Nix version or implementation (Lix, Snix, etc.) The classic usage looks like this:

# Invoke a Nix command with NIX_SHOW_STATS=1
$ NIX_SHOW_STATS=1 nix eval nixpkgs#hello -- --option eval-cache false # disable eval-cache for accuracy

# Or write to a file directly
$ NIX_SHOW_STATS_PATH=stats.json nix eval nixpkgs#hello -- --option eval-cache false
  1. Create the JSON export
  2. Copy it if printed to stdout
  3. Paste or upload it in the input field that appears the first time you visit the site

Once you hit "Load", the JSON will be parsed and you'll be looking at a dash board of your export. By using the snapshot feature, i.e., saving a particular analysis you may compare two named analyses at a time.

Note

nix-evaluator-stats was created in a very short duration, and there might be UI bugs or areas where UI polish is very clearly missing. Please crate an issue if the generated graph or the site UI looks off. Thanks :)

Snapshots

Snapshots are an "experimental" (just means they're new and unpolished) feature that lets you save an analysis in your browser storage with a name to be used later on in the comparison view. At least two named analyses (i.e., snapshots) are required for an analysis.

You can save an analysis as a snapshot from the save button on the bottom right.

Hacking

This project is built with Vite, using Typescript-React (.tsx) and SolidJS. A Nix shell is provided, and dependencies can be fetched with pnpm while inside the dev shell.

# Run the live server
$ pnpm run dev

# Build a static site
$ pnpm run build

If submitting pull requests, please ensure that format (pnpm run fmt) and lint (pnpm run lint) tasks are ran beforehand. The automated CI will tell you whether your code matches the requirements, but it's a good rule of thumb to do this before submitting your PR.

License

This project is made available under Mozilla Public License (MPL) version 2.0. See LICENSE for more details on the exact conditions. An online copy is provided here.