Automic VaultAutomic Vault

brew

Install libcpucycles with Homebrew, apt, dnf, Nix

Microlibrary for counting CPU cycles. Version 20260625 via Homebrew; verified 2026-06-25.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install libcpucycles

local Homebrew formula metadata

Linux

Debian aptverified · 92%
sudo apt install cpucycles

Debian stable package indexes · cpucycles · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install libcpucycles

Fedora Rawhide package metadata · libcpucycles · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#libcpucycles

nixpkgs package indexes · pkgs/by-name/li/libcpucycles/package.nix · source: api.github.com

overview

Package summary

Microlibrary for counting CPU cycles

Commands and aliases

  • cpucycles-info
  • cpucycles-open

history

Project history and usage

libcpucycles is a small timing library for counting CPU cycles across multiple CPU and operating-system counter mechanisms. It comes from the cr.yp.to ecosystem associated with Daniel J. Bernstein's performance-oriented cryptographic and systems software.

Project history

The official introduction describes libcpucycles as a microlibrary for cycle counting, with a simple API: include `cpucycles.h`, call `cpucycles()`, and link with `-lcpucycles`. The project abstracts machine-level counters such as amd64 TSC/PMC, ARM counters, RISC-V counters, and OS fallbacks such as `mach_absolute_time`, `perf_event`, `CLOCK_MONOTONIC`, and `gettimeofday`.

The release notes visible in the 20250925 documentation show active portability work after the early 2023 tarballs, including s390x counter support, FreeBSD support, arm32-1176 support, a `cpucycles-info` man page, and macOS build fixes.

Adoption history

Adoption is concentrated among developers who need reproducible low-overhead timing for cryptography, benchmarking, and systems tuning. Its appearance in Homebrew, Debian, Ubuntu, Fedora-family packages, and Nix reflects a package-manager role as a tiny measurement primitive rather than an end-user application.

How it is used

Programmers use libcpucycles when they want an architecture-aware cycle counter without writing per-platform assembly and fallback code. Package users also get tools such as `cpucycles-info` and `cpucycles-open`, which help inspect available counters and support benchmarking workflows.

Why package nerds care

libcpucycles is package-nerd interesting because it packages the messy hardware reality of cycle counters into a minimal library. It is deliberately small, but its value is in the portability table: one dependency handles CPU families and OS timing APIs that would otherwise become build-system conditionals in every benchmark.

Timeline

  • 2023-01-10: Release notes document `cpucycles_version()` and s390x counter work.
  • 2023-01-15: Release notes mention behavior alignment for `cpucycles_version()`.
  • 2024-01-14: Release notes add arm32-1176 counter support, FreeBSD support, and install/license documentation updates.
  • 2024-03-18: Release notes mention macOS porting fixes and the `cpucycles-info` man page.
  • 2025-09-25: Documentation tree published for libcpucycles-20250925.

Related projects

  • Related projects include the broader cr.yp.to software family, architecture-specific cycle counters such as TSC and PMC, Linux `perf_event`, POSIX clocks, and benchmarking code in cryptographic libraries.

security posture

Risk level: green

library-like package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • library-like package without higher-risk signals

Signals

  • metadata:library-like

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
cpucycles-infocliglobal executable
cpucycles-opencliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version20260625
manager updated2026-06-25
local dataok
upstreamnot checked
latest detectednot detected

https://cpucycles.cr.yp.to/

install metadata

Package metadata

Package keybrew:libcpucycles
Version20260625
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/libcpucycles
Homepagehttps://cpucycles.cr.yp.to/
Upstream docshttps://cpucycles.cr.yp.to/
LicenseLicenseRef-Homebrew-public-domain OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT
Source archivehttps://cpucycles.cr.yp.to/libcpucycles-20260625.tar.gz
Last updated2026-06-25T22:50:15Z
Pulseupdated
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namelibcpucycles
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

cpucycles 0~20240318-2

command-line tool for counting CPU cycles (libcpucycles)

https://cpucycles.cr.yp.to/

sudo apt install cpucycles
  • Section: devel
  • Architecture: amd64
  • Source Package: libcpucycles
  • 2 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Debian stable package indexes · deb.debian.org · Debian stable package indexes: cpucycles from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

libcpucycles-dev 0~20240318-2

library for counting CPU cycles - development files

https://cpucycles.cr.yp.to/

sudo apt install libcpucycles-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: libcpucycles
  • 1 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcpucycles-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

libcpucycles1 0~20240318-2

library for counting CPU cycles

https://cpucycles.cr.yp.to/

sudo apt install libcpucycles1
  • Section: libs
  • Architecture: amd64
  • Source Package: libcpucycles
  • 1 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcpucycles1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

libcpucycles

nix profile install nixpkgs#libcpucycles
  • normalized package name match
  • Matched by: Libcpucycles
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/li/libcpucycles/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

cpucycles 0~20240114-1

command-line tool for counting CPU cycles (libcpucycles)

https://cpucycles.cr.yp.to/

sudo apt install cpucycles
  • Section: universe/devel
  • Architecture: amd64
  • Source Package: libcpucycles
  • 2 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: cpucycles from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

libcpucycles-dev 0~20240114-1

library for counting CPU cycles - development files

https://cpucycles.cr.yp.to/

sudo apt install libcpucycles-dev
  • Section: universe/libdevel
  • Architecture: amd64
  • Source Package: libcpucycles
  • 1 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcpucycles-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

libcpucycles1 0~20240114-1

library for counting CPU cycles

https://cpucycles.cr.yp.to/

sudo apt install libcpucycles1
  • Section: universe/libs
  • Architecture: amd64
  • Source Package: libcpucycles
  • 1 dependencies
  • normalized package name match
  • Matched by: Libcpucycles
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcpucycles1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
dnf95%

libcpucycles 20260105-1.fc44

Library for counting CPU cycles

https://cpucycles.cr.yp.to/

sudo dnf install libcpucycles
  • License: LicenseRef-Fedora-Public-Domain OR 0BSD OR MIT-0 OR MIT
  • Category: Unspecified
  • Architecture: i686
  • Source Package: libcpucycles
  • 4 dependencies
  • 2 provides
  • normalized package name match
  • Matched by: Libcpucycles
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: libcpucycles from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

libcpucycles-devel 20260105-1.fc44

Development files for libcpucycles

https://cpucycles.cr.yp.to/

sudo dnf install libcpucycles-devel
  • License: LicenseRef-Fedora-Public-Domain OR 0BSD OR MIT-0 OR MIT
  • Category: Unspecified
  • Architecture: i686
  • Source Package: libcpucycles
  • 2 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Libcpucycles
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: libcpucycles-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

libcpucycles-static 20260105-1.fc44

Static version of the libcpucycles library

https://cpucycles.cr.yp.to/

sudo dnf install libcpucycles-static
  • License: LicenseRef-Fedora-Public-Domain OR 0BSD OR MIT-0 OR MIT
  • Category: Unspecified
  • Architecture: i686
  • Source Package: libcpucycles
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Libcpucycles
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: libcpucycles-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment