Skip to content

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

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

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.

Sorry, something went wrong.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 7, 2018
@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"

Unverified

This user has not yet uploaded their public signing key.
… by nix-env
@oxij oxij force-pushed the tree/packages-metric branch from 761b248 to 9d35a02 Compare November 17, 2018 10:37
@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.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-linux: 1-10 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 17, 2018
@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
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants