🍺 BREW Explorer

← all formulae

counts

brew install counts v1.0.7 Unlicense

Tool for ad hoc profiling

12
30-day installs · #8219
40
90-day · #7899
177
365-day · #7664
350
★ GitHub stars · updated 4mo ago

Build dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Tool for ad hoc profiling",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:37+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "counts",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-04-20T05:45:47Z",
  "github_readme_excerpt": "# Overview\n\n`counts` is a command line tool for ad hoc profiling. It tallies line\nfrequencies within text files, like an improved version of the Unix command\nchain `sort | uniq -c`.\n\nYou can use it in combination with logging print statements in a program of\ninterest to obtain invaluable, domain-specific profiling data.\n\n# Installing\n\nThe minimum supported Rust version (MSRV) is 1.85.\n\nTo install or update from [crates.io](https://crates.io/):\n\n\u003e `cargo install counts`\n\nThe compiled binary will be put into `~/.cargo/bin/`.\n\n# A simple usage example\n\nConsider the following input.\n```\na 1\nb 2\nc 3\nd 4\nd 4\nc 3\nc 3\nd 4\nb 2\nd 4\n```\n`counts` produces the following output.\n```\n10 counts\n(  1)        4 (40.0%, 40.0%): d 4\n(  2)        3 (30.0%, 70.0%): c 3\n(  3)        2 (20.0%, 90.0%): b 2\n(  4)        1 (10.0%,100.0%): a 1\n```\nIt gives a total line count, and shows all the unique lines, ordered by\nfrequency, with individual and cumulative percentages.\n\nAlternatively, when invoked with the `-i` flag, it assigns each line an\nintegral weight, determined by the last integer that appears on the line (or 1\nif there is no such integer).  On the same input, `counts -i` produces the\nfollowing output.\n```\n30 counts (weighted integral)\n(  1)       16 (53.3%, 53.3%): d 4\n(  2)        9 (30.0%, 83.3%): c 3\n(  3)        4 (13.3%, 96.7%): b 2\n(  4)        1 ( 3.3%,100.0%): a 1\n```\nThe total and per-line counts are now weighted; the output incorporates both\nfrequency and a measure of magnitude.\n\nThe `-f` flag can be used for fractional weights, which can be integers or\nfractional numbers of the form `mm.nn`.\n\nNegative weights are allowed. In the output, each entry is sorted by the\nabsolute value of its aggregate weight. This means that both large positive and\nlarge negative entries will show up near the top.\n\nSometimes you want to group together lines that have different weights but are\notherwise the same. The `-e` flag can be used to erase weights after applying\nthem, by replacing them w",
  "github_repo": "nnethercote/counts",
  "github_stars": 350,
  "github_topics": [],
  "homepage": "https://github.com/nnethercote/counts",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 12,
  "installs_365d": 177,
  "installs_90d": 40,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Unlicense",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "counts",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 8219,
  "rank_365d": 7664,
  "rank_90d": 7899,
  "raw_hash": "3a2c746df4d76b4a",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/c/counts.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "1.0.7",
  "versioned_formulae": [],
  "why_use_this": null
}