Search code examples
nugetopen-source

How to interpret nuget Download statistics / How to know how widely used my package is?


I have a small nuget package (EnumStringValues, plug, plug, plug)

On the nuget page I can see "Download Statistics".

What does this number mean? Some possibilities of when the counter might increase:

  • Any time anyone runs Nuget Restore, including, e.g. Jenkins?
  • Any time anyone runs Nuget Restore for the first time on a particular machine?
  • Any time anyone actually installs the nuget into a project?

Is there any documentation of what those figures actually mean?

Given that the 3rd option is the only one that's really interesting (how widely is this package being used) is there any way to measure that if "Download Statistics" does one of the other options?


Solution

  • It's quite literally total downloads. This is strictly counting on the endpoint side.

    You can't really infer things like installations/restore etc.

    The reason for that is the optimizations that the NuGet clients employ, and simply the development environment of the developer.

    • The NuGet client has the global packages folder which basically means that a package would be downloaded only 1 per machine ideally (people may configure different global packages folders for different projects etc).

    • Next, projects have CI set-up, the configuration there matters as well.

      • Do they reimage the build machine?
      • Do they clean the global packages folder before each run?
    • Another caveat is that you can't infer direct usage of your package vs having a significantly more popular package depend on it.

    Basically, the gist is, unfortunately no, there's currently no way you can understand the per project/per unique user usage of your package.