登录 注册
其他
29,249
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Rust
语言
创建时间
最近更新

项目能做什么

一款轻量易用的命令行基准测试(Benchmarking)工具。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# hyperfine

A command-line benchmarking tool.

<img width="800" height="195" alt="hyperfine-demo-800" src="https://github.com/user-attachments/assets/9a5a45d3-df3f-4e0e-8cc9-5d8153f39e48" />


*(hyperfine in action, benchmarking [`mypy`](https://mypy-lang.org/) and [`ty`](https://ty.dev/))*


## Features

* Statistical analysis across multiple runs.
* Support for various performance metrics and hardware counters.
* Support for arbitrary shell commands.
* Constant feedback about the benchmark progress and current estimates.
* Warmup runs can be executed before the actual benchmark.
* Cache-clearing commands can be set up before each benchmark run.
* Statistical outlier detection to detect interference from other programs and caching effects.
* Export results to various formats: CSV, JSON, Markdown, AsciiDoc.
* Parameterized benchmarks (e.g. vary the number of threads).
* Cross-platform

## Usage

### Basic benchmarks

To run a benchmark, you can simply call `hyperfine <command>...`. Each argument is an executable
and its arguments. Commands run directly by default; use `-S` for shell syntax such as
pipes, redirections, and wildcards. For example:
```sh
hyperfine 'sleep 0.3'
```

Hyperfine will automatically determine the number of runs to perform for each command. By default,
it will perform *at least* 10 benchmarking runs and estimate a run count targeting roughly
3 seconds, including shell overhead and preparation and conclusion commands. To set an exact
number of runs, you can use the `-r`/`--runs` option:
```sh
hyperfine --runs 5 'sleep 0.3'
```

If you want to compare different programs, you can pass multiple commands:
```sh
hyperfine 'hexdump file' 'xxd file'
```

Commands run and appear in input order. The first command is the reference for all comparisons;
each subsequent result shows its change from that reference.

### Warmup runs and preparation commands

For programs that perform a lot of disk I/O, the benchmarking results can be heavily influenced
by disk caches and whether they are cold or warm.

If you want to run the benchmark on a warm cache, you can use the `-w`/`--warmup` option to
perform a certain number of program executions before the actual benchmark:
```sh
hyperfine -S --warmup 3 'grep -R TODO *'
```

Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare`
option to run a special command before *each* benchmark run. For example, to clear Linux filesystem caches,
you can run
```sh
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
```
To use this specific command with hyperfine, call `sudo -v` to temporarily gain sudo permissions
and then call:
```sh
hyperfine -S --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' 'grep -R TODO *'
```

### Parameterized benchmarks

If you want to run a series of benchmarks where a single parameter is varied (say, the number of
threads), you can use the `-P`/`--parameter-scan` option and call:
```sh
hyperfine --prepare 'make clean' --parameter-
阅读完整原文

商业机会分析 AI 生成

CI/CD持续性能回归监控与门禁SaaS平台

产品构想基于Hyperfine的JSON导出功能,构建针对GitHub Actions/GitLab CI的持续基准测试平台(Continuous Benchmarking),检测PR合并前后的性能退化并自动阻断。
核心功能一键集成CI配置、PR自动运行Hyperfine多分支对比、性能变化统计学显著性分析、PR性能对比图表评论、性能劣化告警与阈值阻断。
目标用户重视运行效率的技术团队、中大型开源项目商业化组织、企业DevOps团队。
难度/周期中等 · 2-3个月 · 成本:轻量应用服务器、数据库及CI Runner集成测试资源,初期每月几百元。
收费模式免费额度供开源项目使用,私有仓库/商业团队按PR检测次数或席位订阅制收费。
竞争风险开源社区已有类似通用方案(如Bencher);云CI环境本身的机器噪声(CPU抖动)可能影响基准测试的稳定性与准确度。
依据 已验证事实(Hyperfine支持JSON导出与Git分支对比)结合AI推测

GitHub PR性能基准测试与可视化评论Action(付费商业扩展)

产品构想封装开箱即用的GitHub Action插件,利用Hyperfine的参数化与多命令对比功能,自动生成直观的性能指标Diff和Markdown图表,为私有仓库提供增强告警功能。
核心功能免复杂Shell编写的Action配置、冷热缓存自动化配置模板、Markdown与SVG交互式趋势图生成、PR合并基线数据库同步。
目标用户使用GitHub托管私有代码并对性能敏感的初创公司与中小开发团队。
难度/周期低 · 3-4周 · 成本:极低(依赖GitHub运行环境与轻量许可验证服务)。
收费模式针对私有仓库按仓库数量或组织订阅收取按月授权许可费(License Key验证模式)。
竞争风险技术壁垒较低,容易被开发者使用开源脚本自建替代。
依据 数据支持的判断(Hyperfine在GitHub拥有高Star且原生支持Markdown/JSON输出)

多云算力实例性能比价与自动化压测报告工具

产品构想利用Hyperfine的硬件计数器支持、参数化扫描及准备/清理缓存机制,封装一套标准化的跨云主机CPU/磁盘I/O/网络性能跑分套件,输出云实例性价比选型报告。
核心功能预置常见工作负载(压缩、加解密、IO读写、编译)、一键多云实例批量并发压测、性能波动与成本性价比自动化对比大屏与PDF导出。
目标用户需要大规模采购云服务器的基础设施负责人、云计算架构师、独立站运维工程师。
难度/周期中等 · 1-2个月 · 成本:各云厂商(AWS、阿里云等)实例按量计费测试成本。
收费模式自动化评测报告单次购买、企业定制化跑分服务、云服务商推广返佣(Affiliate)。
竞争风险测试标准化公信力建立难度大,云服务商定价与活动波动频繁导致维护成本高。
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
jabbalaci/SpeedTests 中文介绍暂未生成
comparing the execution speeds of various programming langua
152 Python
chinanf-boy/hyperfine-zh 中文介绍暂未生成
🇨🇳翻译: <hyperfine> 命令行基准测试工具 ❤️ 校对 ✅
90 -
Mic92/nix-hyperfine 中文介绍暂未生成
A command-line tool that uses hyperfine to benchmark Nix der
31 Python
blacha/hyperfine-action 中文介绍暂未生成
Run hyperfine on every commit to monitor performance regress
20 TypeScript
durham-qlm/diatomic-py 中文介绍暂未生成
Python module to calculate the hyperfine energy levels of di
14 Python
AkihiroSuda/ntimes 中文介绍暂未生成
:watch: time(1) with average time, flaky rate, .. [Deprecate
11 Go
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 ,最近推送 ,发布过 30 个 Release
社区活跃Star 29,249 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/sharkdp/hyperfine.git
cd hyperfine
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。