# libcpucycles を Homebrew, dnf, Nix, apt でインストール

libcpucycles のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:libcpucycles
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install libcpucycles
```

  証拠: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install libcpucycles
```

  証拠: Fedora Rawhide package metadata: libcpucycles from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libcpucycles
```

  証拠: nixpkgs package indexes: pkgs/by-name/li/libcpucycles/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- Debian apt (92%):

```sh
sudo apt install cpucycles
```

  証拠: Debian stable package indexes: cpucycles from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## パッケージ情報

- **パッケージキー:** brew:libcpucycles
- **パッケージマネージャ:** Homebrew
- **バージョン:** 20260625
- **ソース概要:** Microlibrary for counting CPU cycles
- **ホームページ:** <https://cpucycles.cr.yp.to/>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- cpucycles-info (エイリアス)
- cpucycles-open (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 20260625
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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 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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

- <https://cpucycles.cr.yp.to/>
- <https://cpucycles.cr.yp.to/libcpucycles-20250925/doc/api.md.html>
- <https://cpucycles.cr.yp.to/libcpucycles-20250925/doc/download.md.html>
- <https://formulae.brew.sh/formula/libcpucycles>


## セキュリティノート

library-like package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- library-like package without higher-risk signals

## 他のパッケージマネージャ記録

- Debian apt - cpucycles - 0~20240318-2: normalized package name match | Debian stable package indexes: cpucycles from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool for counting CPU cycles (libcpucycles) | https://cpucycles.cr.yp.to/
- Debian apt - libcpucycles-dev - 0~20240318-2: normalized package name match | Debian stable package indexes: libcpucycles-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for counting CPU cycles - development files | https://cpucycles.cr.yp.to/
- Debian apt - libcpucycles1 - 0~20240318-2: normalized package name match | Debian stable package indexes: libcpucycles1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for counting CPU cycles | https://cpucycles.cr.yp.to/
- Nix - libcpucycles: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libcpucycles/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cpucycles - 0~20240114-1: normalized package name match | Ubuntu 24.04 LTS package indexes: cpucycles from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool for counting CPU cycles (libcpucycles) | https://cpucycles.cr.yp.to/
- Ubuntu apt - libcpucycles-dev - 0~20240114-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcpucycles-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for counting CPU cycles - development files | https://cpucycles.cr.yp.to/
- Ubuntu apt - libcpucycles1 - 0~20240114-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcpucycles1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for counting CPU cycles | https://cpucycles.cr.yp.to/
- dnf - libcpucycles - 20260625-2.fc45: normalized package name match | Fedora Rawhide package metadata: libcpucycles from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Library for counting CPU cycles | https://cpucycles.cr.yp.to/
- dnf - libcpucycles-devel - 20260625-2.fc45: normalized package name match | Fedora Rawhide package metadata: libcpucycles-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for libcpucycles | https://cpucycles.cr.yp.to/
- dnf - libcpucycles-static - 20260625-2.fc45: normalized package name match | Fedora Rawhide package metadata: libcpucycles-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Static version of the libcpucycles library | https://cpucycles.cr.yp.to/


## Combined YAML source

View the package source record on GitHub. [combined/libcpucycles.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libcpucycles.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
