Skip to content

[FEAT] dag-logstats#691

Merged
gbin merged 9 commits into
masterfrom
yang/feat/dag-logstats
Jan 21, 2026
Merged

[FEAT] dag-logstats#691
gbin merged 9 commits into
masterfrom
yang/feat/dag-logstats

Conversation

@makeecat

@makeecat makeecat commented Jan 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds logstats export and DAG enrichment with hoverable edge stats/perf tables, plus example helpers and payload-size plumbing.

Related Issue: #684

Details

  • Add logstats computation + JSON writer and a log-stats logreader subcommand to export edge/perf stats for a config/mission in core/cu29_export/src/logstats.rs and core/cu29_export/src/lib.rs.
  • Expose per-output raw payload sizes via a new trait and derive-generated implementation to support logstats in core/cu29_traits/src/lib.rs and core/cu29_derive/src/lib.rs.
  • Extend the DAG renderer to ingest --logstats JSON, validate schema/signature/mission, and render edge tooltips + perf table with hover cues in core/cu29_runtime/src/rendercfg.rs, core/cu29_runtime/src/config.rs, and core/cu29_runtime/Cargo.toml.
  • Add dag-logstats helpers and README entries for balancebot and caterpillar examples in examples/cu_rp_balancebot/justfile, examples/cu_caterpillar/justfile, examples/ cu_rp_balancebot/README.md, and examples/cu_caterpillar/README.md.
  • Ignore generated logstats artifacts in .gitignore.

@makeecat makeecat requested a review from gbin January 20, 2026 22:47
@makeecat makeecat self-assigned this Jan 20, 2026
@makeecat makeecat added the enhancement New feature or request label Jan 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 600236dbcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +112 to +116
let duration_secs = duration_ns as f64 / 1_000_000_000.0;
let intervals = (self.valid_time_samples - 1) as f64;
(
Some(intervals / duration_secs),
Some(self.total_raw_bytes as f64 / duration_secs),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude untimestamped bytes from throughput

When some outputs have a payload but no process_time.end, record_sample still adds their bytes to total_raw_bytes, yet throughput here divides by a duration derived only from the subset with valid end times. In logs where valid_time_samples < samples, this inflates throughput_bytes_per_sec (and can mislead downstream visualization) because bytes that lack a timestamp are counted against a shorter time window. Consider tracking bytes only for samples with end_time_ns or returning None when any timed data is missing.

Useful? React with 👍 / 👎.

@gbin

gbin commented Jan 20, 2026

Copy link
Copy Markdown
Collaborator

it ... works :)

just dag-logstats balancebot-logreader logs/balance_0.copper <- this is strange because the log reader takes logs/balance.copper and reads logs/balance_0.copper logs/balance_1.copper etc... (this is a little quirky).

maybe put the entry in directly in the examples where we know the binary and name of the log etc.. it will be easier. The goal of justfiles for me is to exactly not have to remember complex command lines

I have one bug: in chrome it doubles the pop up.

And one improvement request: maybe put a visual cue like hover points in the games so you know you can hover over a link?

@makeecat

Copy link
Copy Markdown
Collaborator Author

it ... works :)

just dag-logstats balancebot-logreader logs/balance_0.copper <- this is strange because the log reader takes logs/balance.copper and reads logs/balance_0.copper logs/balance_1.copper etc... (this is a little quirky).

maybe put the entry in directly in the examples where we know the binary and name of the log etc.. it will be easier. The goal of justfiles for me is to exactly not have to remember complex command lines

I have one bug: in chrome it doubles the pop up.

And one improvement request: maybe put a visual cue like hover points in the games so you know you can hover over a link?

All comments addressed

@gbin gbin merged commit 3244ec5 into master Jan 21, 2026
23 checks passed
@gbin gbin deleted the yang/feat/dag-logstats branch January 21, 2026 15:38
@makeecat makeecat linked an issue Jan 22, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement offline performance statistics

2 participants