Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
810dc26
Update .gitignore, pre-commit configuration, and enhance Cargo files …
reiase Jun 20, 2026
baf82f7
Remove .cargo/config.toml and enhance contributing documentation (#48)
reiase Jun 20, 2026
c5ceeed
Update dependencies, enhance documentation, and add probing features …
reiase Jun 21, 2026
238b2b3
Enhance probing features with new crash demos and improved error hand…
reiase Jun 27, 2026
6556900
Add torchrun cluster heartbeat support and update documentation (#51)
reiase Jun 27, 2026
dcd49ab
Harden cluster mutex handling and align docs with refactor reality.
reiase Jun 27, 2026
5311d59
Enhance mutex handling, error management, and update documentation (#52)
reiase Jun 27, 2026
9237865
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Jun 27, 2026
ab25cfa
Harden mutex handling and enhance documentation for Probing (#53)
reiase Jun 29, 2026
c6784a1
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Jun 29, 2026
7d5ef74
Add accelerator timing module with unit and GPU tests
Jul 6, 2026
4f1e43a
Merge pull request #55 from ShilohYu/feat/timing-module
ShilohYu Jul 6, 2026
4e847db
Enhance cluster mutex handling and update NCCL profiling documentatio…
reiase Jul 6, 2026
be0e509
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Jul 6, 2026
ce3443e
Update project structure and documentation for skills and dependencies
reiase Jul 8, 2026
0275cb1
Enhance Makefile and GitHub Actions for Python virtual environment ma…
reiase Jul 8, 2026
ab84e18
Update dependencies and enhance Makefile for benchmarking and profili…
reiase Jul 11, 2026
a5705db
Enhance soak testing, streamline documentation, and improve workflows…
reiase Jul 11, 2026
6e2a243
Update project structure, enhance documentation, and improve dependen…
reiase Jul 12, 2026
7f6271c
Enhance documentation and add new examples for Megatron-Core and vLLM…
reiase Jul 12, 2026
c3f6723
Update documentation and add Torch Profiler SQL support (#67)
reiase Jul 12, 2026
7591d6e
Update .gitignore, Cargo.lock, and profiling documentation (#68)
reiase Jul 14, 2026
a7cb35a
Refactor profiling documentation and enhance stack capture features (…
reiase Jul 18, 2026
95c4ad8
Feat/slime (#71)
PengchengShi00 Jul 18, 2026
8102d3a
Update Makefile and documentation for example paths and soak scripts …
reiase Jul 26, 2026
0fd054d
Enhance documentation and refactor profiling features (#75)
reiase Jul 26, 2026
be610a2
Add next-generation diagnostics UI (#76)
reiase Jul 27, 2026
65fa7e5
Fix hccl-shim deadlock and expand Msprof passthrough exports (#77)
VincentCheungKokomo Jul 27, 2026
c54ee2a
Improve memtable concurrency and reliability (#78)
reiase Jul 31, 2026
d4c7b01
Improve signal capture reliability (#79)
reiase Jul 31, 2026
1de2e2e
Authenticate local Unix socket peers (#80)
reiase Jul 31, 2026
04f9b77
Refactor embedded server runtime and fan-out
reiase Aug 1, 2026
8c81ae6
Remove obsolete bundled assets and update index.html to reference new…
reiase Aug 1, 2026
bbc73ae
Refactor Next shell and diagnostic contracts (#84)
reiase Aug 3, 2026
c68d918
Add end-to-end NCCL profiling support (#85)
VincentCheungKokomo Aug 3, 2026
7d07797
Unify Next shell diagnostic evidence (#86)
reiase Aug 5, 2026
ad6da03
Stop tracking bundled web assets
reiase Aug 5, 2026
be6671e
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Aug 5, 2026
705fc83
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Aug 6, 2026
e5a5fd2
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Aug 7, 2026
8b8802a
Merge branch 'master' of github.com:DeepLink-org/probing
reiase Aug 7, 2026
92c1a5e
refactor: formalize query, fanout, and extension contracts
reiase Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ docs-clean:

clean:
rm -rf dist docs/site probing/server/web-assets web/dist web/target
rm -rf python/probing/libs python/probing/shim/hccl
rm -rf python/probing/bundled_web python/probing/libs python/probing/shim/hccl
rm -rf .pytest_cache .coverage coverage.xml coverage.lcov
cargo clean
rm -f coverage.lcov coverage.json
9 changes: 6 additions & 3 deletions docs/src/design/federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,20 @@ flowchart LR
RW --> EX[Execute shards]
EX --> TG[Inject federation tags]
TG --> MG[Merge / re-aggregate]
MG --> OUT[DataFrame + FanoutMeta]
MG --> OUT[QueryOutcome DataFrame + QueryQuality]
```

**Conventions**

| Item | Semantics |
|------|-----------|
| Response | `dataframe` + `meta.nodes_queried` + `meta.nodes_failed` |
| Core result | `QueryOutcome<T>` always carries `data` and typed `QueryQuality`; partialness is not a task-local side channel |
| HTTP response | `dataframe` + `meta.nodes_queried` + `meta.nodes_failed` |
| Peer set | Snapshot of `cluster.nodes`, **excluding** coordinator listen addrs |
| Peer execution | Always `probe.*`; peers must not fan-out again |
| Concurrency | Parallel peer requests; latency ≈ slowest peer + coordinator merge |
| Execution | SQL, extension capture, node discovery, and heartbeat HTTP share one async `FanoutService` |
| Isolation | Peer network I/O runs on a dedicated Tokio runtime (`PROBING_FANOUT_WORKER_THREADS`), separate from Axum/DataFusion caller workers |
| Concurrency | Shared bounded peer requests; latency ≈ slowest peer + coordinator merge |
| Timeout | Failed peer → `nodes_failed`; default **30s** (`PROBING_REMOTE_QUERY_TIMEOUT_SECS`) |
| Strict fan-out | `PROBING_FANOUT_STRICT=1` fails query on any `nodes_failed` or `peer_batches_dropped` (no partial merge) |
| Partial HTTP | Cluster/fan-out APIs return **503** with partial `dataframe` when `meta.partial=true` (non-strict only) |
Expand Down
9 changes: 6 additions & 3 deletions docs/src/design/federation.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,20 @@ flowchart LR
RW --> EX[各分片执行]
EX --> TG[注入联邦标签]
TG --> MG[合并 / 二次聚合]
MG --> OUT[DataFrame + FanoutMeta]
MG --> OUT[QueryOutcome DataFrame + QueryQuality]
```

**统一约定**

| 项 | 语义 |
|----|------|
| 响应体 | `dataframe` + `meta.nodes_queried` + `meta.nodes_failed` |
| Core 返回值 | `QueryOutcome<T>` 始终同时携带 `data` 与类型化 `QueryQuality`;partial 不再是 task-local 旁路状态 |
| HTTP 响应体 | `dataframe` + `meta.nodes_queried` + `meta.nodes_failed` |
| Peer 集合 | `cluster.nodes` 快照,**排除** coordinator 自身 listen addr |
| Peer 执行 | 永远 `probe.*`;禁止 peer 再 fan-out(防递归) |
| 并发 | 各 peer 并行请求;总延迟 ≈ 最慢 peer + coordinator 合并 |
| 统一执行 | SQL、Extension 采集、节点发现和心跳 HTTP 共用一个异步 `FanoutService` |
| 资源隔离 | Peer 网络 I/O 使用独立 Tokio runtime(`PROBING_FANOUT_WORKER_THREADS`),不占用 Axum/DataFusion 调用线程 |
| 并发 | 共用有界并发;总延迟 ≈ 最慢 peer + coordinator 合并 |
| 超时 | 失败 peer → `nodes_failed`;默认 **30s**(`PROBING_REMOTE_QUERY_TIMEOUT_SECS`) |
| 严格 fan-out | `PROBING_FANOUT_STRICT=1`:任一 `nodes_failed` 或 `peer_batches_dropped` 则整查失败(无 partial merge) |
| Partial HTTP | 集群/fan-out API 在 `meta.partial=true` 时返回 **503** 及 partial `dataframe`(非 strict 模式) |
Expand Down
8 changes: 5 additions & 3 deletions docs/src/design/modularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,22 @@ New work should extend **one** of these contracts instead of adding cross-module
`global.<schema>.<table>`.
- Do **not** query other collectors from inside `scan()`; join at SQL layer.

### 3.2 `ProbeExtension` — config + imperative HTTP
### 3.2 `ProbeExtension` — typed config + HTTP contracts

**Where:** `probing/core/src/core/probe_extension.rs`
**Derive:** `#[derive(ProbeExtension)]` in `probing-macros`

| Capability | Mechanism |
|------------|-----------|
| Config keys | `probing.<namespace>.<option>` via `set` / `get` / `options` |
| Identity | `ProbeExtension::name` supplies the registration namespace |
| Config keys | `ProbeExtensionConfig` publishes typed key/alias specs and implements `set` / `get` / `options` |
| Side effects | Background sampler start/stop in `set_*` handlers |
| HTTP | `ProbeExtensionCall::call` → `/apis/<name>/...` fallback |
| HTTP | `ProbeExtensionCall::routes` registers method/content-type/CORS/readiness contracts; `call` executes them |

**Rules:**

- Extension name = URL segment (`pythonext`, `rdmaextension`, …).
- Registration validates names, duplicate routes, and config key/alias collisions before engine publication.
- Prefer **tables for data**, extension for **control** (start/stop, eval, flamegraph render).
- Never `todo!()` in default trait methods — return `EngineError`.

Expand Down
9 changes: 5 additions & 4 deletions docs/src/design/modularity.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,18 @@ HTTP 契约:`probing/server/API.md` + `tests/regression/spec/api_spec.json`。

**规则:** schema/scan 在采集 crate 内;跨信号用 SQL JOIN,不在 `scan()` 里调别的采集器。

### 3.2 `ProbeExtension` — 配置 + 命令式 HTTP
### 3.2 `ProbeExtension` — 类型化配置与 HTTP 契约

**定义:** `probing/core/src/core/probe_extension.rs`

| 能力 | 机制 |
|------|------|
| 配置 | `probing.<ns>.<option>` |
| 身份 | `ProbeExtension::name` 定义注册命名空间 |
| 配置 | `ProbeExtensionConfig` 声明 key/alias 并实现 `set` / `get` / `options` |
| 副作用 | `set_*` 里启停采样线程 |
| HTTP | `/apis/<name>/...` |
| HTTP | `ProbeExtensionCall::routes` 声明 method/content-type/CORS/readiness,`call` 负责执行 |

**规则:** 数据走表,控制走 Extension;trait 默认实现禁止 `todo!()`。
**规则:** 注册阶段校验扩展名、重复 route、配置 key/alias 冲突;数据走表,控制走 Extension;trait 默认实现禁止 `todo!()`。

### 3.3 Python `@table` — 应用数据插件

Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ Hierarchical side-channel registration when `WORLD_SIZE > 1`. See [torchrun clus
| `PROBING_CLUSTER_FANOUT_HIERARCHICAL` | `1` | Hierarchical cluster query fan-out (coordinator → local0 → leaves). `0` = flat fan-out to every peer. See [Hierarchical fan-out](../design/hierarchical-fanout.md). |
| `PROBING_REMOTE_QUERY_TIMEOUT_SECS` | `30` | Per-peer timeout for remote federated / cluster queries (seconds). |
| `PROBING_FANOUT_CONCURRENCY` | `128` | Max concurrent in-flight remote fan-out HTTP requests per query. |
| `PROBING_FANOUT_WORKER_THREADS` | `4` | Worker threads in the isolated async fan-out runtime shared by distributed SQL, extension capture, discovery, and heartbeat requests. |
| `PROBING_FANOUT_STRICT` | unset | When `1` or `true`, any federated peer failure or dropped batch fails the whole query instead of returning partial results. |
| `PROBING_STACK_FANOUT_CONCURRENCY` | `32` | Max concurrent peer captures for Distributed stacks. |
| `PROBING_STACK_FANOUT_DEADLINE_SEC` | `15` | Overall Distributed stacks fan-out deadline. Completed peers are returned as a partial flamegraph when the deadline expires. |
| `PROBING_NCCL_CHUNK_BYTES` | `65536` | NCCL profiler mmap ring chunk size (bytes). |
| `PROBING_NCCL_NUM_CHUNKS` | `64` | NCCL profiler mmap ring chunk count (~4 MiB total per table at defaults). |
Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/env-vars.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Probing 读取的全部 `PROBING_*` 环境变量参考(按子系统分组)
| `PROBING_CLUSTER_FANOUT_HIERARCHICAL` | `1` | 分层集群查询 fan-out;`0` = 扁平 fan-out 到所有 peer。 |
| `PROBING_REMOTE_QUERY_TIMEOUT_SECS` | `30` | 远程联邦 / 集群查询的单 peer 超时(秒)。 |
| `PROBING_FANOUT_CONCURRENCY` | `128` | 单次 cluster fan-out 的最大并发远程 HTTP 请求数。 |
| `PROBING_STACK_FANOUT_CONCURRENCY` | `32` | Distributed stacks 同时采集的最大 peer 数。 |
| `PROBING_FANOUT_WORKER_THREADS` | `4` | 分布式 SQL、Extension 采集、节点发现和心跳共用的独立异步 fan-out runtime 线程数。 |
| `PROBING_STACK_FANOUT_DEADLINE_SEC` | `15` | Distributed stacks 的整体 fan-out 截止时间;超时后返回已完成 peer 的部分火焰图并列出失败 peer。 |
| `PROBING_ADVERTISE_ADDR` | `MASTER_ADDR`,否则 hostname | wildcard bind 时向 peer 发布的地址;支持 `host`、`host:port`、IPv6 或 `{port}` 占位符。多网卡环境或 `MASTER_ADDR` 不是当前节点的 peer 可达地址时必须显式设置。 |
| `PROBING_NODE_HOST` | 操作系统 hostname | cluster heartbeat 中上报的显式 host 标签。用于容器身份和本地逻辑节点 fixture;不会改变向 peer 发布的网络地址。 |
Expand Down
13 changes: 4 additions & 9 deletions probing/cli/src/cli/ctrl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,14 @@ impl ProbeEndpoint {
let q_str = serde_json::to_string(&request)?;
let reply_str = self.send_request("/query", &q_str).await?; // Renamed reply variable
let msg = serde_json::from_str::<Message<QueryDataFormat>>(&reply_str)?;
if let Some(meta) = &msg.meta {
if meta
.get("fanout")
.and_then(|f| f.get("partial"))
.and_then(|v| v.as_bool())
.unwrap_or(false)
{
if let Some(quality) = msg.meta.as_ref().and_then(|meta| meta.fanout.as_ref()) {
if quality.is_partial() {
if fanout_strict_enabled() {
return Err(anyhow::anyhow!(
"federated fan-out strict mode: query returned partial data: {meta}"
"federated fan-out strict mode: query returned partial data: {quality:?}"
));
}
eprintln!("warning: federated query returned partial data: {meta}");
eprintln!("warning: federated query returned partial data: {quality:?}");
}
}
let reply = msg.payload;
Expand Down
15 changes: 14 additions & 1 deletion probing/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ pub async fn write(key: &str, value: &str) -> Result<(), EngineError> {
#[cfg(test)]
mod tests {
use super::*;
use crate::core::{ProbeExtension, ProbeExtensionCall, ProbeExtensionOption};
use crate::core::{
ExtensionConfigSpec, ProbeExtension, ProbeExtensionCall, ProbeExtensionConfig,
ProbeExtensionOption,
};
use crate::{create_engine, initialize_engine};

async fn setup_test() -> tokio::sync::MutexGuard<'static, ()> {
Expand Down Expand Up @@ -156,6 +159,16 @@ mod tests {
fn name(&self) -> String {
"test".to_string()
}
}

impl ProbeExtensionConfig for TestExtension {
fn config_specs(&self) -> &'static [ExtensionConfigSpec] {
&[ExtensionConfigSpec {
key: "option",
aliases: &[],
help: "Test option",
}]
}

fn set(&mut self, key: &str, value: &str) -> Result<String, EngineError> {
match key {
Expand Down
Loading
Loading