Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output evaluation statistics #251

Open
danielfullmer opened this issue Sep 20, 2023 · 1 comment
Open

Output evaluation statistics #251

danielfullmer opened this issue Sep 20, 2023 · 1 comment

Comments

@danielfullmer
Copy link

danielfullmer commented Sep 20, 2023

It would be nice if nix-eval-jobs could also output evaluation statistics in the JSON output for each derivation, similar to what we get from nix-build when setting NIX_SHOW_STATS=1:

$ NIX_SHOW_STATS=1 nix-build . -A hello
{
  "cpuTime": 0.07112400233745575,
  "envs": {
    "bytes": 149776,
    "elements": 8144,
    "number": 5289
  },
  "gc": {
    "heapSize": 402915328,
    "totalBytes": 7441872
  },
  "list": {
    "bytes": 21416,
    "concats": 55,
    "elements": 2677
  },
  "nrAvoided": 7500,
  "nrFunctionCalls": 4661,
  "nrLookups": 1970,
  "nrOpUpdateValuesCopied": 283430,
  "nrOpUpdates": 448,
  "nrPrimOpCalls": 3363,
  "nrThunks": 43562,
  "sets": {
    "bytes": 5303360,
    "elements": 329564,
    "number": 1896
  },
  "sizes": {
    "Attr": 16,
    "Bindings": 16,
    "Env": 16,
    "Value": 24
  },
  "symbols": {
    "bytes": 203048,
    "number": 21009
  },
  "values": {
    "bytes": 1350384,
    "number": 56266
  }
}
this path will be fetched (0.05 MiB download, 0.22 MiB unpacked):
  /nix/store/g2m8kfw7kpgpph05v2fxcx4d5an09hl3-hello-2.12.1
copying path '/nix/store/g2m8kfw7kpgpph05v2fxcx4d5an09hl3-hello-2.12.1' from 'https://cache.nixos.org'...
/nix/store/g2m8kfw7kpgpph05v2fxcx4d5an09hl3-hello-2.12.1
@Mic92
Copy link
Member

Mic92 commented Sep 20, 2023

The question is though when to print this. nix-eval-jobs has several background workers each with their own statistics and workers are restarted if they consume too much memory. This makes just using evaluation statistics provided by nix itself hard to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants