Skip to main content

Performance benchmarking tool for Fustor platform

Project description

Fustor 性能基准测试工具 (Benchmark)

该模块是 Fustor 平台的自动化压力测试和性能量化工具。它通过模拟大规模文件系统元数据,量化 Fusion API 相比于操作系统原生文件系统调用的性能优势。

核心设计目标

  1. 量化优势: 对比 Fusion 内存索引与 Linux 原生 find 命令在递归元数据检索下的延迟与吞吐量。
  2. 百万级规模: 支持生成并同步超过 1,000,000 个文件的元数据。
  3. 全自动流程: 自动编排 Registry、Fusion 和 Agent,实现一键式从环境部署到报告生成。

目录结构规范与安全

为了保护生产数据免受误删,Benchmark 实施了严格的路径校验:

  • 路径白名单: 压测主目录(run-dir)必须以 fustor-benchmark-run 结尾。
  • 结构定义:
    • {run-dir}/data/: 存放生成的数百万个模拟文件。
    • {run-dir}/.fustor/: 存放压测期间的独立配置文件、SQLite 数据库、日志以及最终报告。

快速使用

1. 数据生成

构建一个包含 1000 个 UUID 目录,每个目录下 1000 个文件(总计 100 万文件)的测试集:

uv run fustor-benchmark generate fustor-benchmark-run --num-dirs 1000

2. 执行压测

运行全链路同步并执行并发性能对比:

uv run fustor-benchmark run fustor-benchmark-run -d 5 -c 20 -n 100
  • -d: 探测深度。
  • -c: 并发数。
  • -n: 总请求次数。

报告与指标

压测完成后,将在 fustor-benchmark-run/.fustor/ 下生成以下产出:

  1. report.html: 交互式可视化报表。
    • Latency Distribution: 展示 Avg, P50, P95, P99 的柱状对比。
    • Latency Percentiles: 展现延迟分布曲线。
    • Speedup Factor: 自动计算 Fusion 相比 OS 的加速倍数。
  2. benchmark_results.json: 结构化的指标数据,包含所有原始延迟序列。

安全保护说明

Benchmark 会在 run-dir 下执行 shutil.rmtree 操作以清理旧环境。请务必确保指定的目录不包含任何重要业务数据。如果尝试在非 fustor-benchmark-run 后缀目录下运行,程序将强制退出。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fustor_benchmark-0.2.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fustor_benchmark-0.2.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file fustor_benchmark-0.2.1.tar.gz.

File metadata

  • Download URL: fustor_benchmark-0.2.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for fustor_benchmark-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1f32acc47407a3a3bb5078d46d2d2467b21dd328b4b836b6cd7c644690bc26ef
MD5 068c9cbf31375581b815fbf2ec72c924
BLAKE2b-256 3abd948a51d0d493935010eb117ab800b28bb81712abd3dc61c2d3968f2feab7

See more details on using hashes here.

File details

Details for the file fustor_benchmark-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fustor_benchmark-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45082edd1b1b892f18ac0d9530f18a50786f9fb8fd6d993ac7ee8b2cb3fd94d4
MD5 c0ee77b44ffeac54b13f0bc79099c11c
BLAKE2b-256 c85e0b9a57dacdbabd252c9c550b1623287161487b7450573bf6b0a62609e855

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page