macOS
brew install libcpucycleslocal Homebrew formula metadata
安装
brew install libcpucycleslocal Homebrew formula metadata
sudo dnf install libcpucyclesFedora Rawhide package metadata · libcpucycles · 来源: dl.fedoraproject.org
nix profile install nixpkgs#libcpucyclesnixpkgs package indexes · pkgs/by-name/li/libcpucycles/package.nix · 来源: api.github.com
sudo apt install cpucyclesDebian stable package indexes · cpucycles · 来源: deb.debian.org
概览
Microlibrary for counting CPU cycles
历史
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.
安全态势
library-like package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
cpucycles-info | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
cpucycles-open | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:libcpucycles |
|---|---|
| 版本 | 20260625 |
| 软件包管理器 | Homebrew |
| 主页 | https://cpucycles.cr.yp.to/ |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
cpucycles 0~20240318-2
command-line tool for counting CPU cycles (libcpucycles)
sudo apt install cpucycleslibcpucycles-dev 0~20240318-2
library for counting CPU cycles - development files
sudo apt install libcpucycles-devlibcpucycles1 0~20240318-2
library for counting CPU cycles
sudo apt install libcpucycles1libcpucycles
nix profile install nixpkgs#libcpucyclescpucycles 0~20240114-1
command-line tool for counting CPU cycles (libcpucycles)
sudo apt install cpucycleslibcpucycles-dev 0~20240114-1
library for counting CPU cycles - development files
sudo apt install libcpucycles-devlibcpucycles1 0~20240114-1
library for counting CPU cycles
sudo apt install libcpucycles1libcpucycles 20260625-2.fc45
Library for counting CPU cycles
sudo dnf install libcpucycleslibcpucycles-devel 20260625-2.fc45
Development files for libcpucycles
sudo dnf install libcpucycles-devellibcpucycles-static 20260625-2.fc45
Static version of the libcpucycles library
sudo dnf install libcpucycles-static来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.