

第一步:准备工作
1.1 GitCode 上准备仓库
仓库 用途
xuanwu/Daft PR 源(开发者提交 PR 的仓库)
QLiangong/rust-bench-data 数据存储仓库(920B push / 9654 pull)
1.2 920B 环境检查
# 检查现有环境
ls /home/rust-bench/rust-performance/rust-bench/collector/collect-job-queue-results.sh # 新脚本
ls /home/rust-bench/rust-bench-startup-with-results-db.sh # 新启动脚本
rustc +nightly --version
psql "postgresql://rust_bench:rust-bench-xuanwu@39.155.148.152:26002/rust_bench" -c "SELECT 1"
1.3 9654 环境检查
# 检查依赖
rustc +nightly --version
jq --version
sqlite3 --version
java -version
# 检查 Daft 编译环境
ls /root/data/daft # TPC-DS 数据
第二步:920B 部署
2.1 传输新脚本到 920B
# 在开发机器上
scp E:\crate\rust-bench-startup-with-results-db.sh root@<920B_IP>:/home/rust-bench/
scp E:\crate\rust-bench\collector\collect-job-queue-results.sh root@<920B_IP>:/home/rust-bench/rust-performance/rust-bench/collector/
2.2 在 920B 上更新代码
cd /home/rust-bench/rust-performance/rust-bench
git pull
cargo +stable build --release -p collector --features s3-sdk
2.3 设置权限
chmod +x /home/rust-bench/rust-bench-startup-with-results-db.sh
chmod +x /home/rust-bench/rust-performance/rust-bench/collector/collect-job-queue-results.sh
2.4 启动 920B
nohup /home/rust-bench/rust-bench-startup-with-results-db.sh &
2.5 验证 920B 启动
# 查看日志
tail -f /home/rust-bench/rust-performance/collector_run.log
# 预期日志:
# [INFO] 采集任务启动中(CI模式 + results-db双写)...
# [INFO] RESULTS_DB: /home/rust-bench/results_920b.db
# [INFO] BENCH_RESULTS_DIR: /home/rust-bench/bench-results
# [INFO] 数据存储仓库已存在: /home/rust-bench/bench-results
# [INFO] 工作目录: /home/rust-bench/rust-performance/rust-bench
# [INFO] 开始执行采集脚本(CI模式 + results-db双写)...
# [INFO] Running job queue collector with results-db dual-write
2.6 920B 运行循环
启动脚本 → collect-job-queue-results.sh(无限循环)
│
每轮循环:
├── git pull(更新 rust-bench 代码)
├── cargo build(重新编译 collector)
├── collector benchmark_job_queue
│ ├── --db postgresql://... (CI模式:webhook触发,job queue,PR评论)
│ ├── --results-db results_920b.db (同时写SQLite)
│ ├── --check_git_sha (自动更新检查)
│ └── --collector_name "Kunpeng 920B"
├── 跑完后:
│ ├── 检查 results_920b.db 是否存在
│ ├── cp 到 bench-results 仓库
│ ├── git add + commit + push 到 QLiangong/rust-bench-data
│ └── 日志记录 "Push complete"
└── 如果失败: sleep 60s 后重试
第三步:9654 部署
3.1 打包
在 920B 或开发机器上:
cd /path/to/rust-bench
./scripts/build-release.sh
3.2 传输到 9654
scp scripts/output/rust-bench-collector-*.tar.gz root@<9654_IP>:/home/rust-bench/
3.3 解压
cd /home/rust-bench
tar xzf rust-bench-collector-*.tar.gz
cd rust-bench-collector-*/
3.4 配置
vim relay/relay-config.sh
需要确认/修改的配置:
GITCODE_TOKEN="你的Token" # GitCode API Token
BENCH_RESULTS_REPO="QLiangong/rust-bench-data" # 数据存储仓库
COLLECTOR_TAG="AMD EPYC 9654" # 采集器标签
COLLECTOR_REPO="gitcode/xuanwu/Daft" # 仓库标识
POLL_INTERVAL=300 # 轮询间隔(秒)
DAFT_EXTRA_ARGS="--data-folder /root/data/daft --bind-config default=3"
3.5 初始化
export GITCODE_TOKEN="你的Token"
./relay/relay-setup.sh
预期输出:
=== Relay Setup ===
Cloning bench-results repo from QLiangong/rust-bench-data...
Done
[OK] bench-results repo has 1 commit(s)
[OK] State directory created
[OK] GitCode token valid
[OK] Collector found
[OK] Site found
[OK] jq found
[OK] sqlite3 found
=== Setup Complete ===
3.6 启动
export GITCODE_TOKEN="你的Token"
./relay/relay-startup.sh
启动后两个进程:
- Site(后台 PID=xxxx):./site results.db → 端口 2346
- relay-daemon(前台):无限循环轮询
3.7 验证 9654
# 查看日志
tail -f relay_daemon.log
# 预期日志:
# [INFO] === relay tick ===
# [INFO] PR #123: head=abc123... parent=def456...
# [INFO] Benchmarking PR #123 parent (sha=def456...)...
# [INFO] PR #123 parent (sha=def456...) benchmark complete
# [INFO] Benchmarking PR #123 head (sha=abc123...)...
# [INFO] PR #123 head (sha=abc123...) benchmark complete
# [INFO] New 920B results detected, pulling...
# [INFO] 920B results merged into local database
# [INFO] sleeping 300s...
# 检查数据库
sqlite3 results.db "SELECT DISTINCT name, tag FROM artifact;"
# 预期看到:
# abc123...|AMD EPYC 9654
# def456...|AMD EPYC 9654
# abc123...|Kunpeng 920B (从920B合并过来的)
# def456...|Kunpeng 920B (从920B合并过来的)
# 检查 Site
curl -s http://localhost:2346/ | head -5
3.8 访问 Site
中转机器浏览器:
http://<9654_IP>:2346/compare.html
第四步:日常运行流程
4.1 开发者提交 PR
开发者在 GitCode xuanwu/Daft 仓库创建 PR
↓
GitCode 发送 webhook → 920B Site 接收
↓
Site 创建 BenchmarkRequest 到 PostgreSQL
↓
Site 在 PR 下发评论:"已排队 commit xxx 进行 benchmark"
4.2 920B 自动执行
920B collector 轮询 PostgreSQL → 发现新 job
↓
clone PR 代码 → 编译 Daft → 跑 benchmark
↓
结果写入:
├── PostgreSQL(CI功能:PR评论、status页面)
└── results_920b.db(本地SQLite)
↓
git push results_920b.db → QLiangong/rust-bench-data 仓库
↓
Site 在 PR 下发评论:
"Benchmark 完成!
对比: compare.html?start=parent_sha&end=head_sha&stat=wall-time:default
&tag_a=Kunpeng+920B&tag_b=Kunpeng+920B&repo=daft"
4.3 9654 自动执行
9654 relay-daemon 每 5 分钟轮询:
│
├── 轮询 GitCode Daft 仓库 PR 列表
│ ├── 发现新 PR #123 (head=abc123, parent=def456)
│ ├── 检查 processed_shas.txt → abc123 和 def456 都没跑过
│ ├── clone def456 (parent) → 编译 Daft → 跑 benchmark
│ │ --id def456 --tag "AMD EPYC 9654" --repo "gitcode/xuanwu/Daft"
│ │ → 结果写入本地 results.db
│ │ → 记录 def456 到 processed_shas.txt
│ ├── clone abc123 (head) → 编译 Daft → 跑 benchmark
│ │ --id abc123 --tag "AMD EPYC 9654" --repo "gitcode/xuanwu/Daft"
│ │ → 结果写入本地 results.db
│ │ → 记录 abc123 到 processed_shas.txt
│ └── 如果 PR 有新 commit (abc123 → xyz789)
│ → xyz789 不在 processed_shas.txt → 重新跑
│
├── 轮询 QLiangong/rust-bench-data 仓库
│ ├── git fetch → 发现新 commit
│ ├── git pull → 获取 results_920b.db
│ ├── 合并到本地 results.db (INSERT OR IGNORE)
│ │ → 920B 的结果 (tag=Kunpeng 920B) 加入本地数据库
│ └── 记录最新 commit SHA
│
└── sleep 300s
4.4 查看结果
中转机器浏览器访问 http://<9654_IP>:2346/compare.html
对比类型 URL 参数
920B before/after start=<parent_sha>&end=<head_sha>&stat=wall-time:default&tag_a=Kunpeng+920B&tag_b=Kunpeng+920B&repo=daft
9654 before/after start=<parent_sha>&end=<head_sha>&stat=wall-time:default&tag_a=AMD+EPYC+9654&tag_b=AMD+EPYC+9654&repo=daft
跨机器对比 cross-machine.html?tag_a=Kunpeng+920B&mod_a=<head_sha>&orig_a=<parent_sha>&tag_b=AMD+EPYC+9654&mod_b=<head_sha>&orig_b=<parent_sha>&stat=wall-time:default
页面显示:
- Commits 下拉框:commit SHA + 日期
- Tags:Kunpeng 920B 和 AMD EPYC 9654
- Metric:wall-time:default
- Summary:All / Regression / Improvement(算术平均)
- 跨机器页面:几何平均


DAFT_EXTRA_ARGS="--data-folder /home/data --tpch-scale-factor 100 --output-dir /home/data/daft_output --bind-config default=3"
"$COLLECTOR_DIR/collector" bench_runtime_local +nightly \
--group daft \
--id "$commit_sha" \
--db "$RESULTS_DB" \
--tag "$COLLECTOR_TAG" \
--repo "$COLLECTOR_REPO" \
--iterations "$ITERATIONS" \
--include "daft-bench::tpch" \
-- --daft-dir "$tmp_dir" $DAFT_EXTRA_ARGS


bash +x relay/relay-setup.sh
=== Relay Setup ===
Cloning bench-results repo from QLiangong/rust-bench-data...
Cloning into '/home/y30075072/rust-performance/rust-bench/bench-results-clone'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (6/6), done.
Done
Checking bench-results repo initialization...
[OK] bench-results repo has 2 commit(s)
Creating state directory...
[OK] State directory: /home/y30075072/rust-performance/rust-bench/relay/state
processed_shas.txt: tracks benchmarked commit SHAs
last_results_commit: tracks latest synced bench-results commit
Verifying GitCode token...
ERROR: GitCode API token invalid or repo not accessible (HTTP 401)
Please check:
- GITCODE_TOKEN is set correctly
- DAFT_REPO is correct: xuanwu/Daft
- The token has api scope


# 测试 Bearer 格式
curl -s -o /dev/null -w "%{http_code}" \
"https://api.gitcode.com/api/v5/repos/xuanwu/Daft" \
-H "Authorization: Bearer 你的token"
# 期望: 200
# 如果仓库是公开的,也可以不带 token 测试
curl -s -o /dev/null -w "%{http_code}" \
"https://api.gitcode.com/api/v5/repos/xuanwu/Daft"
# 如果返回 200,说明公开仓库不需要 token


curl -s -o /dev/null -w "https://gitcode.com/xuanwu/Daft.git" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft" -H "Authorization: Bearer N7b3Z9CVQ42SHbYNH95Tnszx"
curl -s -o /dev/null -w "https://gitcode.com/xuanwu/Daft.git" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft"
[root@localhost rust-bench]# curl -s -o /dev/null -w "https://gitcode.com/xuanwu/Daft.git" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft" -H "Authorization: Bearer N7b3Z9CVQ42SHbYNH95Tnszx"
https://gitcode.com/xuanwu/Daft.git
[root@localhost rust-bench]# curl -s -o /dev/null -w "https://gitcode.com/xuanwu/Daft.git" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft"
https://gitcode.com/xuanwu/Daft.git


curl -s -o /dev/null -w "%{http_code}" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft" -H "Authorization: Bearer N7b3Z9CVQ42SHbYNH95Tnszx"
200
curl -s -o /dev/null -w "%{http_code}" "https://api.gitcode.com/api/v5/repos/xuanwu/Daft"
400


./relay/relay-startup.sh: line 20: ./site: Is a directory
./relay/relay-startup.sh: line 30: /home/y30075072/rust-performance/rust-bench/relay/relay-daemon.sh: Permission denied
./relay/relay-startup.sh: line 30: /home/y30075072/rust-performance/rust-bench/relay/relay-daemon.sh: Permission denied
./relay/relay-startup.sh: line 20: ./site: Is a directory


第一步:GitCode 上准备数据存储仓库
仓库地址:https://gitcode.com/QLiangong/rust-bench-data.git
确保仓库有初始 commit(README):
git clone https://gitcode.com/QLiangong/rust-bench-data.git
cd rust-bench-data
echo "# rust-bench-data" > README.md
git add README.md
git commit -m "Initial commit"
git push origin main
第二步:920B 部署(CI 模式 + --results-db 双写)
2.1 拉取最新代码
cd /home/rust-bench/rust-performance/rust-bench
git pull
2.2 构建前端(如果前端代码有更新)
cd site/frontend
npm install
npm run build
cd ../..
2.3 编译 collector 和 site
cargo +stable build --release -p collector --features s3-sdk
cargo +stable build --release -p site
验证新参数可用:
./target/release/collector benchmark_job_queue --help | grep results-db
# 应看到: --results_db <RESULTS_DB>
./target/release/collector bench_runtime_local --help | grep repo
# 应看到: --repo <REPO> [default: rust]
2.4 在 920B 上 clone 数据存储仓库
cd /home/rust-bench
git clone https://gitcode.com/QLiangong/rust-bench-data.git bench-results
2.5 确保 collect-job-queue-results.sh 有执行权限
chmod +x /home/rust-bench/rust-performance/rust-bench/collector/collect-job-queue-results.sh
2.6 创建 920B 启动脚本
cat > /home/rust-bench/rust-bench-startup-with-results-db.sh << 'EOF'
#!/bin/bash
set -euo pipefail
# 1. Rustup 镜像
export RUSTUP_DIST_SERVER="https://mirrors.tuna.tsinghua.edu.cn/rustup"
export RUSTUP_UPDATE_ROOT="https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup"
export PATH="/root/.cargo/bin:$PATH"
# 2. uv 镜像
export UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
# 3. npm 镜像
export npm_config_registry="shturl.cc/WYMxQ6MVMAkhVJpqchT5"
# 4. Conda
CONDA_SH="/home/miniconda3/etc/profile.d/conda.sh"
CONDA_ENV="/home/rust-bench/envs/rust-bench-daft"
# 5. 采集器配置
export COLLECTOR_NAME="Kunpeng 920B"
export DATABASE="postgresql://rust_bench:rust-bench-xuanwu@39.155.148.152:26002/rust_bench"
# 6. SQLite 双写配置
export RESULTS_DB="/home/rust-bench/results_920b.db"
export BENCH_RESULTS_DIR="/home/rust-bench/bench-results"
export BENCH_RESULTS_BRANCH="main"
# 7. Site 刷新间隔(秒)
export SITE_REFRESH_INTERVAL_SECONDS=300
# 8. 目标脚本
TARGET_DIR="/home/rust-bench/rust-performance/rust-bench"
TARGET_SCRIPT="${TARGET_DIR}/collector/collect-job-queue-results.sh"
LOG_FILE="/home/rust-bench/rust-performance/collector_run.log"
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> "$LOG_FILE"; }
log "======================================"
log "采集任务启动中(CI模式 + results-db双写)..."
log "COLLECTOR_NAME: $COLLECTOR_NAME"
log "DATABASE: $DATABASE"
log "RESULTS_DB: $RESULTS_DB"
log "BENCH_RESULTS_DIR: $BENCH_RESULTS_DIR"
# Conda 初始化
if [ ! -f "$CONDA_SH" ]; then
log "错误:Conda 初始化脚本不存在: $CONDA_SH"
exit 1
fi
source "$CONDA_SH"
[ -n "${CONDA_ENV:-}" ] && conda activate "$CONDA_ENV"
# 检查并 clone 数据存储仓库
if [ ! -d "$BENCH_RESULTS_DIR/.git" ]; then
log "数据存储仓库不存在,正在 clone..."
git clone https://gitcode.com/QLiangong/rust-bench-data.git "$BENCH_RESULTS_DIR"
log "数据存储仓库 clone 完成"
else
log "数据存储仓库已存在: $BENCH_RESULTS_DIR"
cd "$BENCH_RESULTS_DIR"
git fetch origin 2>/dev/null || true
git pull origin "$BENCH_RESULTS_BRANCH" 2>/dev/null || true
cd -
fi
# 检查目标脚本
if [ ! -f "$TARGET_SCRIPT" ]; then
log "错误:目标脚本不存在: $TARGET_SCRIPT"
exit 1
fi
chmod +x "$TARGET_SCRIPT" 2>/dev/null || true
# 切换工作目录
cd "$TARGET_DIR"
log "工作目录: $TARGET_DIR"
log "开始执行采集脚本..."
"$TARGET_SCRIPT" >> "$LOG_FILE" 2>&1
EXIT_CODE=$?
log "采集脚本退出,退出码: $EXIT_CODE"
exit $EXIT_CODE
EOF
chmod +x /home/rust-bench/rust-bench-startup-with-results-db.sh
2.7 启动 920B
nohup /home/rust-bench/rust-bench-startup-with-results-db.sh &
2.8 验证 920B
# 查看日志
tail -f /home/rust-bench/rust-performance/collector_run.log
# 预期看到:
# [INFO] 采集任务启动中(CI模式 + results-db双写)...
# [INFO] RESULTS_DB: /home/rust-bench/results_920b.db
# [INFO] BENCH_RESULTS_DIR: /home/rust-bench/bench-results
# [INFO] Running job queue collector with results-db dual-write
# 检查 SQLite 文件生成
ls -la /home/rust-bench/results_920b.db
# 检查 bench-results 仓库有推送
cd /home/rust-bench/bench-results
git log --oneline -5
第三步:9654 部署(relay 模式)
3.1 拉取最新代码
cd /home/y30075072/rust-performance/rust-bench
git pull
3.2 构建前端
cd site/frontend
npm install
npm run build
cd ../..
3.3 编译 collector 和 site
cargo +stable build --release -p collector --features s3-sdk
cargo +stable build --release -p site
验证二进制:
ls -la target/release/collector
ls -la target/release/site
3.4 设置 relay 脚本权限
chmod +x relay/relay-config.sh relay/relay-daemon.sh relay/relay-merge.sh relay/relay-setup.sh relay/relay-startup.sh
3.5 配置 relay-config.sh
vim relay/relay-config.sh
确认/修改以下配置:
# GitCode Token
GITCODE_TOKEN="${GITCODE_TOKEN}"
# 数据存储仓库(默认值已改为 QLiangong/rust-bench-data,确认即可)
BENCH_RESULTS_REPO="${BENCH_RESULTS_REPO:-QLiangong/rust-bench-data}"
# Daft 参数 — 改为你的实际路径
DAFT_EXTRA_ARGS="--data-folder /home/data --tpch-scale-factor 100 --output-dir /home/data/daft_output --bind-config default=3"
# 迭代次数 — 与 920B 一致
ITERATIONS=5
3.6 创建输出目录
mkdir -p /home/data/daft_output/csv
3.7 初始化
export GITCODE_TOKEN="N7b3Z9CVQ42SHbYNH95Tnszx"
cd /home/y30075072/rust-performance/rust-bench
./relay/relay-setup.sh
预期输出:
=== Relay Setup ===
Cloning bench-results repo from QLiangong/rust-bench-data...
Done
[OK] bench-results repo has 1 commit(s)
[OK] State directory created
[OK] GitCode token valid
[OK] Collector found at /home/y30075072/rust-performance/rust-bench/target/release/collector
[OK] Site found at /home/y30075072/rust-performance/rust-bench/target/release/site
[OK] jq found
[OK] sqlite3 found
[OK] WAL mode enabled
=== Setup Complete ===
3.8 启动 9654
export GITCODE_TOKEN="N7b3Z9CVQ42SHbYNH95Tnszx"
export SITE_REFRESH_INTERVAL_SECONDS=300
cd /home/y30075072/rust-performance/rust-bench
./relay/relay-startup.sh
这会启动两个进程:
- Site(后台):target/release/site results.db → 端口 2346
- relay-daemon(前台):无限循环轮询 GitCode
3.9 验证 9654
# 查看日志
tail -f relay_daemon.log
# 预期日志:
# [INFO] Starting relay mode on 9654...
# [INFO] COLLECTOR_BIN: .../target/release/collector
# [INFO] SITE_BIN: .../target/release/site
# [INFO] Site started (PID=xxxx), reading from results.db
# [INFO] Starting relay daemon...
# [INFO] === relay tick ===
# [INFO] PR #xxx: head=xxx parent=xxx
# [INFO] Benchmarking PR #xxx parent (sha=xxx)...
# [INFO] PR #xxx parent (sha=xxx) benchmark complete
# [INFO] Benchmarking PR #xxx head (sha=xxx)...
# [INFO] PR #xxx head (sha=xxx) benchmark complete
# [INFO] New 920B results detected, pulling...
# [INFO] 920B results merged into local database
# [INFO] sleeping 300s...
# 检查 Site
curl -s http://localhost:2346/ | head -5
# 检查数据库
sqlite3 results.db "SELECT DISTINCT name, tag FROM artifact;"
3.10 访问 Site
中转机器浏览器访问:
http://<9654_IP>:2346/compare.html
第四步:日常运行流程
4.1 开发者提交 PR
开发者在 GitCode xuanwu/Daft 创建 PR
↓
GitCode 发送 webhook → 920B Site 接收
↓
Site 创建 BenchmarkRequest 到 PostgreSQL
↓
Site 在 PR 下发评论:"已排队 commit xxx"
4.2 920B 自动执行
920B collector 轮询 PostgreSQL → 发现新 job
↓
clone PR 代码 → 编译 Daft → 跑 benchmark(5轮)
↓
结果同时写入:
├── PostgreSQL(CI功能:PR评论、status页面)
└── results_920b.db(本地SQLite)
↓
git push results_920b.db → QLiangong/rust-bench-data 仓库
↓
Site 在 PR 下发评论(含对比链接)
4.3 9654 自动执行
9654 relay-daemon 每 5 分钟轮询:
┌─ 轮询 GitCode Daft PR 列表 ──────────────────────┐
│ 发现新 PR #xxx (head=abc123, parent=def456) │
│ ├── 跑 parent (def456) │
│ │ clone → 编译 Daft → collector bench_runtime_local
│ │ --id def456 --tag "AMD EPYC 9654" │
│ │ --repo "gitcode/xuanwu/Daft" │
│ │ --db results.db --iterations 5 │
│ │ --include "daft-bench::tpch" │
│ │ → 写入本地 results.db │
│ └── 跑 head (abc123) │
│ 同上流程 │
└───────────────────────────────────────────────────┘
┌─ 轮询 QLiangong/rust-bench-data 仓库 ────────────┐
│ git fetch → 发现新 commit │
│ git pull → 获取 results_920b.db │
│ 合并到本地 results.db (INSERT OR IGNORE) │
│ → 920B 的结果加入本地数据库 │
└───────────────────────────────────────────────────┘
sleep 300s
4.4 Site 自动刷新
9654 Site 每 5 分钟自动刷新 Index:
→ 重新加载数据库索引
→ 新跑的 benchmark 结果自动出现在网页上
→ 无需重启 Site
4.5 查看结果
中转机器浏览器访问 http://<9654_IP>:2346/compare.html
对比类型 URL
920B before/after ?start=<parent_sha>&end=<head_sha>&stat=wall-time:default&tag_a=Kunpeng+920B&tag_b=Kunpeng+920B&repo=daft
9654 before/after ?start=<parent_sha>&end=<head_sha>&stat=wall-time:default&tag_a=AMD+EPYC+9654&tag_b=AMD+EPYC+9654&repo=daft
跨机器对比 cross-machine.html?tag_a=Kunpeng+920B&mod_a=<head_sha>&orig_a=<parent_sha>&tag_b=AMD+EPYC+9654&mod_b=<head_sha>&orig_b=<parent_sha>&stat=wall-time:default
启动/停止命令
920B:
# 启动
nohup /home/rust-bench/rust-bench-startup-with-results-db.sh &
# 停止
pkill -f collect-job-queue-results.sh
pkill -f "collector benchmark_job_queue"
# 查看日志
tail -f /home/rust-bench/rust-performance/collector_run.log
9654:
# 启动
export GITCODE_TOKEN="N7b3Z9CVQ42SHbYNH95Tnszx"
export SITE_REFRESH_INTERVAL_SECONDS=300
cd /home/y30075072/rust-performance/rust-bench
./relay/relay-startup.sh
# 停止
pkill -f relay-daemon.sh
pkill -f "site results.db"
# 查看日志
tail -f relay_daemon.log


+ zipp==3.23.0
+ zstandard==0.24.0
Updating git repository `https://gitcode.com/xuanwu/arrow_rs.git`
Updating git repository `https://gitcode.com/xuanwu/snap.git`
warning: spurious network error (3 tries remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
warning: spurious network error (2 tries remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
warning: spurious network error (1 try remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
error: failed to load source for dependency `snap`
Caused by:
Unable to update https://gitcode.com/xuanwu/snap.git?tag=1.1.1--htrunk1
Caused by:
failed to fetch into: /root/.cargo/git/db/snap-92bb86e568e185a5
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
failed to receive HTTP 200 response: got 401; class=Net (12)
💥 maturin failed
Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
Caused by: `cargo metadata` exited with an error:
make: *** [Makefile:59: build-release] Error 1
Toolchain is correct, continuing with build
Updating git repository `https://gitcode.com/xuanwu/arrow_rs.git`
Updating git repository `https://gitcode.com/xuanwu/snap.git`
warning: spurious network error (3 tries remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
warning: spurious network error (2 tries remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
warning: spurious network error (1 try remaining): failed to receive HTTP 200 response: got 401; class=Net (12)
error: failed to load source for dependency `snap`
Caused by:
Unable to update https://gitcode.com/xuanwu/snap.git?tag=1.1.1--htrunk1
Caused by:
failed to fetch into: /root/.cargo/git/db/snap-92bb86e568e185a5
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
failed to receive HTTP 200 response: got 401; class=Net (12)
💥 maturin failed
Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
Caused by: `cargo metadata` exited with an error:
make: *** [Makefile:59: build-release] Error 1
错误: make build-release 失败。
[2026-07-22 15:51:04] Daft build failed for PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)


# 私有仓库认证(仅影响当前进程,不修改全局git配置)
export CARGO_NET_GIT_FETCH_WITH_CLI=true
export GIT_CONFIG_COUNT=1
export GIT_CONFIG_KEY_0="url.https://oauth2:${GITCODE_TOKEN}@gitcode.com.insteadOf"
export GIT_CONFIG_VALUE_0="https://gitcode.com"


ip addr | grep inet


📦 Built wheel for abi3 Python ≥ 3.10 to /tmp/daft-cda48c23/target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
-----------------------------------------
编译完成!生成的 wheel 文件位于:
target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
卸载旧的daft:pip uninstall -y daft
Found existing installation: daft 0.3.0.dev0
Uninstalling daft-0.3.0.dev0:
Successfully uninstalled daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
安装新的daft:
pip install target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Looking in indexes: http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/
Processing ./target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Requirement already satisfied: pyarrow<24.0.0,>=15.0.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (21.0.0)
Requirement already satisfied: fsspec<2026.3.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (2025.10.0)
Requirement already satisfied: tqdm<4.68.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (4.67.1)
Requirement already satisfied: packaging in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (25.0)
Installing collected packages: daft
Successfully installed daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
========================================
Using database `/home/y30075072/rust-performance/rust-bench/results.db`
collector error: Failed to list benchmark dir 'collector/runtime-benchmarks'
Caused by:
No such file or directory (os error 2)
[2026-07-22 17:22:30] PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) benchmark failed
[2026-07-22 17:22:32] Benchmarking PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26)...
开始准备编译 Daft,项目路径: /tmp/daft-e6254f7e
=========================================


warning: `daft-context` (lib) generated 2 warnings
Finished `release` profile [optimized] target(s) in 0.38s
📦 Built wheel for abi3 Python ≥ 3.10 to /tmp/daft-0dcaa842/target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
-----------------------------------------
编译完成!生成的 wheel 文件位于:
target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
卸载旧的daft:pip uninstall -y daft
Found existing installation: daft 0.3.0.dev0
Uninstalling daft-0.3.0.dev0:
Successfully uninstalled daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
安装新的daft:
pip install target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Looking in indexes: http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/
Processing ./target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Requirement already satisfied: pyarrow<24.0.0,>=15.0.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (21.0.0)
Requirement already satisfied: fsspec<2026.3.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (2025.10.0)
Requirement already satisfied: tqdm<4.68.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (4.67.1)
Requirement already satisfied: packaging in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (25.0)
Installing collected packages: daft
Successfully installed daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
========================================
error: unexpected argument '\' found
Usage: collector bench_runtime_local [OPTIONS] <RUSTC> [-- <BENCH_ARGS>...]
For more information, try '--help'.
/home/y30075072/rust-performance/rust-bench/relay/relay-daemon.sh: line 77: --: command not found
[2026-07-23 04:23:33] PR #23 head (sha=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1) benchmark failed
[2026-07-23 04:23:36] New 920B results detected, pulling...
[2026-07-23 04:23:37] bench-results repo updated but results_920b.db not found, waiting for 920B to push results
[2026-07-23 04:23:37] sleeping 3600s...
[2026-07-23 05:23:37] === relay tick ===
[2026-07-23 05:23:38] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-23 05:23:38] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
开始准备编译 Daft,项目路径: /tmp/daft-3554774b
=========================================


# 跑benchmark
if "$COLLECTOR_BIN" bench_runtime_local +nightly \
--group daft \
--id "$commit_sha" \
--db "$RESULTS_DB" \
--tag "$COLLECTOR_TAG" \
--repo "$COLLECTOR_REPO" \
--iterations "$ITERATIONS" \
--include "daft-bench::tpch" \\
-- --daft-dir "$tmp_dir" $DAFT_EXTRA_ARGS; then


[2026-07-23 11:16:16] === relay tick ===
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-23T03:16:16.173Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-23T03:16:16.173Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
[2026-07-23T03:16:16.173Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
Loading complete; found 1 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-23T03:16:16.596Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK
[2026-07-23 11:16:16] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-23 11:16:16] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
[2026-07-23 11:16:16] Cache hit, installing cached wheel
[2026-07-23T03:16:16.975Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK


psql "DATABASE" -c "\d collection"
psql "DATABASE" -c "\d runtime_pstat_series"
psql "$DATABASE" -c "\d runtime_pstat"
pkill -f "site results.db"


2. 查看数据库中有多少 artifact
sqlite3 results.db "SELECT COUNT(*) FROM artifact;"
3. 查看 artifact 详情(name, tag, repo)
sqlite3 results.db "SELECT name, tag, repo FROM artifact;"
4. 查看 runtime_pstat 有多少行数据
sqlite3 results.db "SELECT COUNT(*) FROM runtime_pstat;"
5. 查看有哪些 benchmark 和 metric
sqlite3 results.db "SELECT DISTINCT s.benchmark, s.metric FROM runtime_pstat_series s;"


sqlite3 results.db "SELECT COUNT(*) FROM artifact;"
1
(/home/y30075072/env) [root@localhost rust-bench]# sqlite3 results.db "SELECT name, tag, repo FROM artifact;"
3554774b2eb6d89bc78ee195c8b490a87b7b9be3|AMD EPYC 9654|gitcode/xuanwu/Daft
(/home/y30075072/env) [root@localhost rust-bench]# sqlite3 results.db "SELECT COUNT(*) FROM runtime_pstat;"
110
(/home/y30075072/env) [root@localhost rust-bench]# sqlite3 results.db "SELECT DISTINCT s.benchmark, s.metric FROM runtime_pstat_series s;"
daft-bench::tpch::01|bind-info
daft-bench::tpch::01|perf-record:default
daft-bench::tpch::01|wall-time
daft-bench::tpch::01|wall-time:default
daft-bench::tpch::01|wall-time:default-perf
daft-bench::tpch::02|bind-info
daft-bench::tpch::02|perf-record:default
daft-bench::tpch::02|wall-time
daft-bench::tpch::02|wall-time:default
daft-bench::tpch::02|wall-time:default-perf
daft-bench::tpch::03|bind-info
daft-bench::tpch::03|perf-record:default
daft-bench::tpch::03|wall-time
daft-bench::tpch::03|wall-time:default
daft-bench::tpch::03|wall-time:default-perf
daft-bench::tpch::04|bind-info
daft-bench::tpch::04|perf-record:default
daft-bench::tpch::04|wall-time
daft-bench::tpch::04|wall-time:default
daft-bench::tpch::04|wall-time:default-perf
daft-bench::tpch::05|bind-info
daft-bench::tpch::05|perf-record:default
daft-bench::tpch::05|wall-time
daft-bench::tpch::05|wall-time:default
daft-bench::tpch::05|wall-time:default-perf
daft-bench::tpch::06|bind-info
daft-bench::tpch::06|perf-record:default
daft-bench::tpch::06|wall-time
daft-bench::tpch::06|wall-time:default
daft-bench::tpch::06|wall-time:default-perf
daft-bench::tpch::07|bind-info
daft-bench::tpch::07|perf-record:default
daft-bench::tpch::07|wall-time
daft-bench::tpch::07|wall-time:default
daft-bench::tpch::07|wall-time:default-perf
daft-bench::tpch::08|bind-info
daft-bench::tpch::08|perf-record:default
daft-bench::tpch::08|wall-time
daft-bench::tpch::08|wall-time:default
daft-bench::tpch::08|wall-time:default-perf
daft-bench::tpch::09|bind-info
daft-bench::tpch::09|perf-record:default
daft-bench::tpch::09|wall-time
daft-bench::tpch::09|wall-time:default
daft-bench::tpch::09|wall-time:default-perf
daft-bench::tpch::10|bind-info
daft-bench::tpch::10|perf-record:default
daft-bench::tpch::10|wall-time
daft-bench::tpch::10|wall-time:default
daft-bench::tpch::10|wall-time:default-perf
daft-bench::tpch::11|bind-info
daft-bench::tpch::11|perf-record:default
daft-bench::tpch::11|wall-time
daft-bench::tpch::11|wall-time:default
daft-bench::tpch::11|wall-time:default-perf
daft-bench::tpch::12|bind-info
daft-bench::tpch::12|perf-record:default
daft-bench::tpch::12|wall-time
daft-bench::tpch::12|wall-time:default
daft-bench::tpch::12|wall-time:default-perf
daft-bench::tpch::13|bind-info
daft-bench::tpch::13|perf-record:default
daft-bench::tpch::13|wall-time
daft-bench::tpch::13|wall-time:default
daft-bench::tpch::13|wall-time:default-perf
daft-bench::tpch::14|bind-info
daft-bench::tpch::14|perf-record:default
daft-bench::tpch::14|wall-time
daft-bench::tpch::14|wall-time:default
daft-bench::tpch::14|wall-time:default-perf
daft-bench::tpch::15|bind-info
daft-bench::tpch::15|perf-record:default
daft-bench::tpch::15|wall-time
daft-bench::tpch::15|wall-time:default
daft-bench::tpch::15|wall-time:default-perf
daft-bench::tpch::16|bind-info
daft-bench::tpch::16|perf-record:default
daft-bench::tpch::16|wall-time
daft-bench::tpch::16|wall-time:default
daft-bench::tpch::16|wall-time:default-perf
daft-bench::tpch::17|bind-info
daft-bench::tpch::17|perf-record:default
daft-bench::tpch::17|wall-time
daft-bench::tpch::17|wall-time:default
daft-bench::tpch::17|wall-time:default-perf
daft-bench::tpch::18|bind-info
daft-bench::tpch::18|perf-record:default
daft-bench::tpch::18|wall-time
daft-bench::tpch::18|wall-time:default
daft-bench::tpch::18|wall-time:default-perf
daft-bench::tpch::19|bind-info
daft-bench::tpch::19|perf-record:default
daft-bench::tpch::19|wall-time
daft-bench::tpch::19|wall-time:default
daft-bench::tpch::19|wall-time:default-perf
daft-bench::tpch::20|bind-info
daft-bench::tpch::20|perf-record:default
daft-bench::tpch::20|wall-time
daft-bench::tpch::20|wall-time:default
daft-bench::tpch::20|wall-time:default-perf
daft-bench::tpch::21|bind-info
daft-bench::tpch::21|perf-record:default
daft-bench::tpch::21|wall-time
daft-bench::tpch::21|wall-time:default
daft-bench::tpch::21|wall-time:default-perf
daft-bench::tpch::22|bind-info
daft-bench::tpch::22|perf-record:default
daft-bench::tpch::22|wall-time
daft-bench::tpch::22|wall-time:default
daft-bench::tpch::22|wall-time:default-perf


./target/release/site results.db
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-23T06:26:37.162Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-23T06:26:37.162Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
[2026-07-23T06:26:37.162Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
Loading complete; found 6 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-23T06:26:37.568Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK
[2026-07-23T06:26:37.946Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK


1. 检查 site-config.toml 是否有 CRLF 问题:
cd /home/y30075072/rust-performance/rust-bench
file site-config.toml
# 如果显示 "ASCII text, with CRLF line terminators" 说明有 CRLF 问题
2. 检查 /perf/repos API 返回什么:
curl -s http://localhost:2346/perf/repos
# 预期: {"repos":[{"name":"daft"}]}
# 如果返回 {"repos":[]} 说明后端没返回仓库列表
3. 检查 /perf/info API 返回什么:
curl -s "http://localhost:2346/perf/info?repo=daft"
# 查看返回的 JSON 中 benchmarked_commits 是否有数据
4. 检查数据库中的 type 字段:
sqlite3 results.db "SELECT DISTINCT type FROM artifact;"
# 预期: master
# 如果为空或其他值,get_benchmarked_commits 的 WHERE type='master' 查不到
5. 检查数据库中的 repo 字段是否有隐藏字符:
sqlite3 results.db "SELECT DISTINCT hex(repo) FROM artifact;"


curl -s http://localhost:2346/compare.html
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>rustc performance data</title>
<link rel="alternate icon" type="image/png" href="/favicon-32x32.png" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="stylesheet" type="text/css" href="styles/shared.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles/uPlot.min.css" />
<style>
#app {
margin: 0;
}
ul li {
margin: 0;
}
ul li input {
vertical-align: middle;
margin: 0 2px;
}
</style>
<link rel="stylesheet" type="text/css" href="scripts/compare.css" />
</head>
<body class="container">
<nav class="site-nav">
<a href="compare.html">Compare</a>
<a href="cross-machine.html">Cross-Machine</a>
<a href="status.html">Status</a>
<a href="help.html">Help</a>
</nav>
<div id="app"></div>
<footer class="site-footer">
<a href="https://gitcode.com/xuanwu/rust-bench">Contribute on GitCode</a>
</footer>
<script src="scripts/compare.js"></script>
</body>
</html>


# 1. 检查 CRLF
file site-config.toml
# 2. 检查日志中是否有 panic
grep -i "panic" relay_daemon.log | tail -10
# 3. 用超时测试 API
curl -m 5 http://localhost:2346/perf/repos
# 4. 设置大间隔后重启 Site
pkill -f "site results.db"
QUEUE_UPDATE_INTERVAL_SECONDS=999999 ./target/release/site results.db
# 5. 再测试 API
curl -m 5 http://localhost:2346/perf/repos


[2026-07-23 15:08:17] === relay tick ===
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-23T07:08:17.589Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-23T07:08:17.589Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
[2026-07-23T07:08:17.589Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
Loading complete; found 6 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-23T07:08:18.169Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK
[2026-07-23T07:08:18.536Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK
[2026-07-23 15:08:18] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-23 15:08:18] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
[2026-07-23 15:08:18] PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3) already benchmarked successfully, skipping
[2026-07-23 15:08:18] Benchmarking PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6)...
[2026-07-23 15:08:18] PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6) already benchmarked successfully, skipping
[2026-07-23 15:08:18] PR #39: head=e6254f7e3e7da0ba1f071df274ebe777dd17bc26 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-23 15:08:18] Benchmarking PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-23 15:08:18] PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-23 15:08:18] Benchmarking PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26)...
[2026-07-23 15:08:18] PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26) already benchmarked successfully, skipping
[2026-07-23 15:08:18] PR #37: head=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-23 15:08:18] Benchmarking PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-23 15:08:18] PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-23 15:08:18] Benchmarking PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11)...
[2026-07-23 15:08:18] PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11) already benchmarked successfully, skipping
[2026-07-23 15:08:18] PR #36: head=f6d1de3cd375874ef58b9f4b15921be9ea47341f parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-23 15:08:18] Benchmarking PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-23 15:08:18] PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-23 15:08:18] Benchmarking PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f)...
[2026-07-23 15:08:18] PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f) already benchmarked successfully, skipping
[2026-07-23 15:08:18] PR #33: head=daf47f3dba5f2af625211751007b4f97be6d94d6 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-23 15:08:18] Benchmarking PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-23 15:08:18] PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-23 15:08:18] Benchmarking PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6)...
[2026-07-23 15:08:18] Cache miss, cloning and building...


# 1. 确认 Site 二进制的编译时间
ls -la target/release/site
# 对比代码更新时间
git log -1 --format="%ci"
# 2. 重新编译 Site
cd /home/y30075072/rust-performance/rust-bench
cargo +stable build --release -p site
# 3. 重新编译 collector(同样需要更新)
cargo +stable build --release -p collector --features s3-sdk
# 4. 杀掉旧 Site
pkill -f "site results.db"
# 5. 重启 Site
QUEUE_UPDATE_INTERVAL_SECONDS=999999 ./target/release/site results.db &
# 6. 等 3 秒后测试 API
sleep 3
curl -m 5 http://localhost:2346/perf/repos


# 1. 查看数据库中所有 artifact 的 tag 和 repo
sqlite3 results.db "SELECT name, tag, repo FROM artifact;"
# 2. 查看有哪些不同的 repo
sqlite3 results.db "SELECT DISTINCT repo FROM artifact;"
# 3. 查看有哪些不同的 tag
sqlite3 results.db "SELECT DISTINCT tag FROM artifact;"


sqlite3 results.db "SELECT name, tag, repo FROM artifact;"
3554774b2eb6d89bc78ee195c8b490a87b7b9be3|AMD EPYC 9654|gitcode/xuanwu/Daft
3554774b2eb6d89bc78ee195c8b490a87b7b9be3|default|rust
8ae52012ea2340afaa7d5a99ee72f53563f50bf6|AMD EPYC 9654|gitcode/xuanwu/Daft
8ae52012ea2340afaa7d5a99ee72f53563f50bf6|default|rust
cda48c235f36d24087a4304a7f9dff53035140a7|AMD EPYC 9654|gitcode/xuanwu/Daft
cda48c235f36d24087a4304a7f9dff53035140a7|default|rust
e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11|AMD EPYC 9654|gitcode/xuanwu/Daft
e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11|default|rust
e6254f7e3e7da0ba1f071df274ebe777dd17bc26|AMD EPYC 9654|gitcode/xuanwu/Daft
e6254f7e3e7da0ba1f071df274ebe777dd17bc26|default|rust
f6d1de3cd375874ef58b9f4b15921be9ea47341f|AMD EPYC 9654|gitcode/xuanwu/Daft
f6d1de3cd375874ef58b9f4b15921be9ea47341f|default|rust
(/home/y30075072/env) [root@localhost rust-bench]# sqlite3 results.db "SELECT DISTINCT repo FROM artifact;"
gitcode/xuanwu/Daft
rust
(/home/y30075072/env) [root@localhost rust-bench]# sqlite3 results.db "SELECT DISTINCT tag FROM artifact;"
AMD EPYC 9654
default


sqlite3 results.db "UPDATE artifact SET repo = 'daft' WHERE repo = 'gitcode/xuanwu/Daft';"


warning: `daft-context` (lib) generated 2 warnings
Finished `release` profile [optimized] target(s) in 0.39s
📦 Built wheel for abi3 Python ≥ 3.10 to /tmp/daft-daf47f3d/target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
-----------------------------------------
编译完成!生成的 wheel 文件位于:
target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
卸载旧的daft:pip uninstall -y daft
Found existing installation: daft 0.3.0.dev0
Uninstalling daft-0.3.0.dev0:
Successfully uninstalled daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
安装新的daft:
pip install target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Looking in indexes: http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/
Processing ./target/wheels/daft-0.3.0.dev0-cp310-abi3-manylinux_2_38_x86_64.whl
Requirement already satisfied: pyarrow<24.0.0,>=15.0.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (21.0.0)
Requirement already satisfied: fsspec<2026.3.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (2025.10.0)
Requirement already satisfied: tqdm<4.68.0 in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (4.67.1)
Requirement already satisfied: packaging in /home/y30075072/env/lib/python3.11/site-packages (from daft==0.3.0.dev0) (25.0)
Installing collected packages: daft
Successfully installed daft-0.3.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
========================================
[2026-07-23 18:09:19] Wheel cached at /home/y30075072/rust-performance/rust-bench/cache/daf47f3dba5f2af625211751007b4f97be6d94d6
/home/y30075072/rust-performance/rust-bench/relay/relay-daemon.sh: line 134: /home/y30075072/rust-performance/rust-bench/collector: Is a directory
[2026-07-23 18:09:22] PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6) benchmark failed
[2026-07-23 18:09:22] Recorded in failed_shas.txt (remove to retry, wheel cache preserved)


[2026-07-24 10:38:56] === relay tick ===
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-24T02:38:56.418Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-24T02:38:56.418Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
[2026-07-24T02:38:56.419Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
Loading complete; found 7 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-24T02:38:56.827Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK
[2026-07-24 10:38:57] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-24 10:38:57] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
[2026-07-24 10:38:57] PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3) already benchmarked successfully, skipping
[2026-07-24 10:38:57] Benchmarking PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6)...
[2026-07-24 10:38:57] PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6) already benchmarked successfully, skipping
[2026-07-24 10:38:57] PR #39: head=e6254f7e3e7da0ba1f071df274ebe777dd17bc26 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 10:38:57] Benchmarking PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 10:38:57] PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 10:38:57] Benchmarking PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26)...
[2026-07-24 10:38:57] PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26) already benchmarked successfully, skipping
[2026-07-24 10:38:57] PR #37: head=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 10:38:57] Benchmarking PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 10:38:57] PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 10:38:57] Benchmarking PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11)...
[2026-07-24 10:38:57] PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11) already benchmarked successfully, skipping
[2026-07-24 10:38:57] PR #36: head=f6d1de3cd375874ef58b9f4b15921be9ea47341f parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 10:38:57] Benchmarking PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 10:38:57] PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 10:38:57] Benchmarking PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f)...
[2026-07-24 10:38:57] PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f) already benchmarked successfully, skipping
[2026-07-24 10:38:57] PR #33: head=daf47f3dba5f2af625211751007b4f97be6d94d6 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 10:38:57] Benchmarking PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 10:38:57] PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 10:38:57] Benchmarking PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6)...
[2026-07-24 10:38:57] Cache hit, installing cached wheel
[2026-07-24T02:38:57.205Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK


[2026-07-24 10:49:25] New 920B results detected, pulling...
[2026-07-24 10:49:25] bench-results repo updated but results_920b.db not found, waiting for 920B to push results
[2026-07-24 10:49:25] sleeping 3600s...


[2026-07-24 11:18:43] === relay tick ===
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-24T03:18:43.538Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-24T03:18:43.538Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
[2026-07-24T03:18:43.538Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
Loading complete; found 8 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-24T03:18:43.937Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK
[2026-07-24T03:18:44.327Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK
[2026-07-24 11:18:44] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-24 11:18:44] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
[2026-07-24 11:18:44] PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6)...
[2026-07-24 11:18:44] PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6) already benchmarked successfully, skipping
[2026-07-24 11:18:44] PR #39: head=e6254f7e3e7da0ba1f071df274ebe777dd17bc26 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:18:44] Benchmarking PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:18:44] PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26)...
[2026-07-24 11:18:44] PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26) already benchmarked successfully, skipping
[2026-07-24 11:18:44] PR #37: head=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:18:44] Benchmarking PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:18:44] PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11)...
[2026-07-24 11:18:44] PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11) already benchmarked successfully, skipping
[2026-07-24 11:18:44] PR #36: head=f6d1de3cd375874ef58b9f4b15921be9ea47341f parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:18:44] Benchmarking PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:18:44] PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f)...
[2026-07-24 11:18:44] PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f) already benchmarked successfully, skipping
[2026-07-24 11:18:44] PR #33: head=daf47f3dba5f2af625211751007b4f97be6d94d6 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:18:44] Benchmarking PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:18:44] PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6)...
[2026-07-24 11:18:44] PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6) already benchmarked successfully, skipping
[2026-07-24 11:18:44] PR #23: head=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:18:44] Benchmarking PR #23 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:18:44] PR #23 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:18:44] Benchmarking PR #23 head (sha=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1)...
[2026-07-24 11:18:44] PR #23 head (sha=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1) already benchmarked successfully, skipping
[2026-07-24 11:18:45] sleeping 3600s...


[2026-07-24 11:17:04] === relay tick ===
Loading self-profile data from local directory
Starting server with port=2346
[2026-07-24T03:17:04.998Z ERROR site::load] No `[keys]` section found in the site configuration; platform API tokens and webhook secrets are not configured
[2026-07-24T03:17:04.999Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'daft' (gitcode/xuanwu/Daft) will fail
[2026-07-24T03:17:04.999Z ERROR site::load] `[keys.gitcode]` is not configured; platform API requests and webhook verification for repo 'rust' (gitcode/xuanwu/rust) will fail
Loading complete; found 8 artifacts
View the results in a web browser at 'http://localhost:2346/compare.html'
[2026-07-24T03:17:05.409Z ERROR site::load] Failed to list commits for daft/0.7.5_dev: 401 != 200 OK
[2026-07-24 11:17:05] PR #40: head=8ae52012ea2340afaa7d5a99ee72f53563f50bf6 parent=3554774b2eb6d89bc78ee195c8b490a87b7b9be3
[2026-07-24 11:17:05] Benchmarking PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3)...
[2026-07-24 11:17:05] PR #40 parent (sha=3554774b2eb6d89bc78ee195c8b490a87b7b9be3) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6)...
[2026-07-24 11:17:05] PR #40 head (sha=8ae52012ea2340afaa7d5a99ee72f53563f50bf6) already benchmarked successfully, skipping
[2026-07-24 11:17:05] PR #39: head=e6254f7e3e7da0ba1f071df274ebe777dd17bc26 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:17:05] Benchmarking PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24T03:17:05.788Z ERROR site::load] Failed to list commits for rust/main: 401 != 200 OK
[2026-07-24 11:17:05] PR #39 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26)...
[2026-07-24 11:17:05] PR #39 head (sha=e6254f7e3e7da0ba1f071df274ebe777dd17bc26) already benchmarked successfully, skipping
[2026-07-24 11:17:05] PR #37: head=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:17:05] Benchmarking PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:17:05] PR #37 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11)...
[2026-07-24 11:17:05] PR #37 head (sha=e2857b0ca9e5cfcbe7df0772e9c1d98c58b92d11) already benchmarked successfully, skipping
[2026-07-24 11:17:05] PR #36: head=f6d1de3cd375874ef58b9f4b15921be9ea47341f parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:17:05] Benchmarking PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:17:05] PR #36 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f)...
[2026-07-24 11:17:05] PR #36 head (sha=f6d1de3cd375874ef58b9f4b15921be9ea47341f) already benchmarked successfully, skipping
[2026-07-24 11:17:05] PR #33: head=daf47f3dba5f2af625211751007b4f97be6d94d6 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:17:05] Benchmarking PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:17:05] PR #33 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6)...
[2026-07-24 11:17:05] PR #33 head (sha=daf47f3dba5f2af625211751007b4f97be6d94d6) already benchmarked successfully, skipping
[2026-07-24 11:17:05] PR #23: head=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1 parent=cda48c235f36d24087a4304a7f9dff53035140a7
[2026-07-24 11:17:05] Benchmarking PR #23 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7)...
[2026-07-24 11:17:05] PR #23 parent (sha=cda48c235f36d24087a4304a7f9dff53035140a7) already benchmarked successfully, skipping
[2026-07-24 11:17:05] Benchmarking PR #23 head (sha=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1)...
[2026-07-24 11:17:05] PR #23 head (sha=0dcaa8425783c9da5fc484c3a0448c30e3ddc4d1) already benchmarked successfully, skipping
[2026-07-24 11:17:05] bench-results repo not cloned yet, run relay-setup.sh first
[2026-07-24 11:17:05] sleeping 3600s...


This metric produces structured (JSON) data — no numeric summary available.


target/release/site /home/y30075072/rust-performance/rust-bench/bench-results-clone/results_920b.db
Loading self-profile data from local directory
Starting server with port=2346
thread 'tokio-rt-worker' (2932217) panicked at database/src/pool/sqlite.rs:113:40:
called `Result::unwrap()` on an `Err` value: SqlInputError { error: Error { code: Unknown, extended_code: 1 }, msg: "table artifact already exists", sql: "\n create table artifact(\n id integer primary key not null,\n name text not null unique,\n date integer,\n type text not null\n );\n create table collection(\n id integer primary key not null\n );\n create table error_series(\n id integer primary key not null,\n crate text not null unique references benchmark(name) on delete cascade on update cascade\n );\n create table error(\n series integer not null references error_series(id) on delete cascade on update cascade,\n aid integer not null references artifact(id) on delete cascade on update cascade,\n error text,\n PRIMARY KEY(series, aid)\n );\n create table pstat_series(\n id integer primary key not null,\n crate text not null references benchmark(name) on delete cascade on update cascade,\n profile text not null,\n cache text not null,\n statistic text not null,\n UNIQUE(crate, profile, cache, statistic)\n );\n create table pstat(\n series integer references pstat_series(id) on delete cascade on update cascade,\n aid integer references artifact(id) on delete cascade on update cascade,\n cid integer references collection(id) on delete cascade on update cascade,\n value double not null,\n PRIMARY KEY(series, aid, cid)\n );\n create table self_profile_query_series(\n id integer primary key not null,\n crate text not null references benchmark(name) on delete cascade on update cascade,\n profile text not null,\n cache text not null,\n query text not null,\n UNIQUE(crate, profile, cache, query)\n );\n create table self_profile_query(\n series integer references self_profile_query_series(id) on delete cascade on update cascade,\n aid integer references artifact(id) on delete cascade on update cascade,\n cid integer references collection(id) on delete cascade on update cascade,\n self_time integer,\n blocked_time integer,\n incremental_load_time integer,\n number_of_cache_hits integer,\n invocation_count integer,\n PRIMARY KEY(series, aid, cid)\n );\n create table pull_request_builds(\n bors_sha text unique,\n pr integer not null,\n parent_sha text,\n complete boolean,\n requested timestamp without time zone\n );\n ", offset: 22 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


修复方案
步骤 1:清理 9654 上的旧 920B 数据
sqlite3 results.db "
-- 删除 920B 的 runtime_pstat 数据
DELETE FROM runtime_pstat WHERE aid IN (SELECT id FROM artifact WHERE tag = 'Kunpeng 920B');
-- 删除 920B 的 artifact
DELETE FROM artifact WHERE tag = 'Kunpeng 920B';
-- 清理孤立的 series(如果 9654 自己的数据还在用则不会删)
-- 注意:不要删,因为 9654 自己的数据也引用这些 series
-- runtime_pstat_series 的 UNIQUE(benchmark,target,metric) 去重保证不会重复
-- 清理孤立的 collection
DELETE FROM collection WHERE id NOT IN (SELECT DISTINCT cid FROM runtime_pstat);
"
# 清空 last_results_commit,强制下次重新合并
> relay/state/last_results_commit
步骤 2:在 920B 上重新导出(使用修复后的脚本)
cd /home/rust-bench/rust-performance/rust-bench
git pull
./scripts/export_pg_to_sqlite.sh
# 验证输出:repo=daft, tag=Kunpeng 920B, json_value NULL 正确, user_version=28
步骤 3:push 到 GitCode
cd bench-results
cp ../results_920b.db .
git add results_920b.db
git commit -m "Export 920B data (fixed: repo=daft, NULL json_value, user_version=28)"
git push origin main
步骤 4:9654 重新合并
# 重启 relay-daemon(会自动检测并合并)
export GITCODE_TOKEN="N7b3Z9CVQ42SHbYNH95Tnszx"
./relay/relay-startup.sh
# 或者手动触发合并
cd bench-results-clone && git pull origin main && cd ..
source relay/relay-merge.sh
步骤 5:验证合并结果
# 应该看到两个 tag
sqlite3 results.db "SELECT DISTINCT tag FROM artifact;"
# AMD EPYC 9654
# Kunpeng 920B
# 每个 tag 应该有对应数量的数据
sqlite3 results.db "SELECT a.tag, COUNT(*) FROM runtime_pstat p JOIN artifact a ON p.aid = a.id GROUP BY a.tag;"
# AMD EPYC 9654|<9654的数据量>
# Kunpeng 920B|<920B的数据量>
# json_value 不应该有空字符串
sqlite3 results.db "SELECT COUNT(*) FROM runtime_pstat WHERE json_value = '';"
# 0
# repo 应该都是 daft
sqlite3 results.db "SELECT DISTINCT repo FROM artifact;"
# daft


sqlite3 results.db "SELECT tag, repo, COUNT(*) FROM artifact GROUP BY tag, repo;"


处理步骤
第一步:清理 9654 上的旧 920B 数据
# 删除 920B 合并进来的有问题数据
sqlite3 results.db "
DELETE FROM runtime_pstat WHERE aid IN (SELECT id FROM artifact WHERE tag = 'Kunpeng 920B');
DELETE FROM artifact WHERE tag = 'Kunpeng 920B';
DELETE FROM collection WHERE id NOT IN (SELECT DISTINCT cid FROM runtime_pstat);
"
# 清空 last_results_commit,强制下次重新合并
> relay/state/last_results_commit
# 验证清理结果
sqlite3 results.db "SELECT tag, repo, COUNT(*) FROM artifact GROUP BY tag, repo;"
# 预期: 只有 AMD EPYC 9654 | daft | <数量>
第二步:在 920B 上重新导出(使用修复后的脚本)
# 920B 上
cd /home/rust-bench/rust-performance/rust-bench
git pull
chmod +x scripts/export_pg_to_sqlite.sh
./scripts/export_pg_to_sqlite.sh
# 验证导出结果
sqlite3 results_920b.db "SELECT DISTINCT repo FROM artifact;" # 预期: daft
sqlite3 results_920b.db "SELECT DISTINCT tag FROM artifact;" # 预期: Kunpeng 920B
sqlite3 results_920b.db "SELECT COUNT(*) FROM runtime_pstat WHERE json_value = '';" # 预期: 0
sqlite3 results_920b.db "SELECT COUNT(*) FROM runtime_pstat WHERE json_value IS NOT NULL;" # 预期: 小数字
sqlite3 results_920b.db "PRAGMA user_version;" # 预期: 28
第三步:push 到 GitCode
# 920B 上
cd bench-results
cp ../results_920b.db .
git add results_920b.db
git commit -m "Export 920B data (fixed: repo=daft, NULL json_value)"
git push origin main
第四步:9654 重新合并
# 9654 上
export GITCODE_TOKEN="N7b3Z9CVQ42SHbYNH95Tnszx"
cd /home/y30075072/rust-performance/rust-bench
git pull
sed -i 's/\r$//' relay/*.sh
chmod +x relay/*.sh
# 先停掉旧进程
pkill -f relay-daemon.sh 2>/dev/null || true
pkill -f "site results.db" 2>/dev/null || true
# 启动(会自动 clone/pull + 首次强制合并)
./relay/relay-startup.sh
第五步:验证合并结果
# 1. tag 分布(应该有两个)
sqlite3 results.db "SELECT tag, COUNT(*) FROM artifact GROUP BY tag;"
# 预期: AMD EPYC 9654 | <数量>
# Kunpeng 920B | <数量>
# 2. repo 分布(应该全是 daft)
sqlite3 results.db "SELECT DISTINCT repo FROM artifact;"
# 预期: daft
# 3. json_value 无空字符串
sqlite3 results.db "SELECT COUNT(*) FROM runtime_pstat WHERE json_value = '';"
# 预期: 0
# 4. 每个 tag 的数据量
sqlite3 results.db "SELECT a.tag, COUNT(p.*) FROM runtime_pstat p JOIN artifact a ON p.aid = a.id GROUP BY a.tag;"
# 预期: 两个 tag 都有数据
# 5. ID 关联验证
sqlite3 results.db "SELECT p.aid, a.tag, a.name, p.value, s.metric FROM runtime_pstat p JOIN artifact a ON p.aid = a.id JOIN runtime_pstat_series s ON p.series = s.id WHERE s.metric = 'wall-time:default' LIMIT 10;"
# 预期: 920B 的数据 aid 指向 tag=Kunpeng 920B 的 artifact
# 6. Site 页面验证
# 重启 Site 后访问 compare 页面,选择 wall-time:default,应该显示数值(不是 JSON)


# 用事务包裹,确保原子性
sqlite3 results.db "
BEGIN TRANSACTION;
DELETE FROM runtime_pstat WHERE aid IN (SELECT id FROM artifact WHERE tag = 'Kunpeng 920B');
DELETE FROM artifact WHERE tag = 'Kunpeng 920B';
DELETE FROM collection WHERE id NOT IN (SELECT DISTINCT cid FROM runtime_pstat);
COMMIT;
"

