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

metrics.nix: add a metrick for the current number of packages as seen by nix-env #49863

Merged
merged 1 commit into from Nov 22, 2018

Conversation

oxij
Copy link
Member

@oxij oxij commented Nov 7, 2018

Motivation for this change

A tiny piece of #45841 I would like to be applied anyway.

Things done

It is a bit hacky, but

  • I using this for quite a while and I'm very happy about it.

@oxij
Copy link
Member Author

oxij commented Nov 8, 2018

@edolstra, @vcunat, can we have this one, please? As I noted in #38635 (comment) without this current hydra's metrics don't make that much sense.

@@ -49,6 +49,9 @@ runCommand "nixpkgs-metrics"
run nix-env.qa nix-env -f ${nixpkgs} -qa
run nix-env.qaDrv nix-env -f ${nixpkgs} -qa --drv-path --meta --xml

num=$(nix-env -f ${nixpkgs} -qa --drv-path --meta --xml | grep '<item ' | wc -l)
echo "nix-env.qaDrv.number $num" >> $out/nix-support/hydra-metrics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just nix-env -f ${nixpkgs} -qa | wc -l

Also, I'd prefer the name "count" instead of "number"

@oxij
Copy link
Member Author

oxij commented Nov 17, 2018

How about just nix-env -f ${nixpkgs} -qa | wc -l

The results differ slightly, but that is not particularly important. Changed.

Also, I'd prefer the name "count" instead of "number"

Done.

@7c6f434c 7c6f434c merged commit c5ab75a into NixOS:master Nov 22, 2018
@oxij
Copy link
Member Author

oxij commented Nov 22, 2018 via email

@oxij oxij mentioned this pull request Jan 18, 2019
1 task
@oxij oxij deleted the tree/packages-metric branch August 12, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants