Skip to content

feat(test-logging,test-consume): add ms-precision lifecycle logging to consume enginex - #3306

Open
danceratopz wants to merge 1 commit into
ethereum:forks/amsterdamfrom
danceratopz:enginex-improve-logging
Open

feat(test-logging,test-consume): add ms-precision lifecycle logging to consume enginex#3306
danceratopz wants to merge 1 commit into
ethereum:forks/amsterdamfrom
danceratopz:enginex-improve-logging

Conversation

@danceratopz

Copy link
Copy Markdown
Member

Description

TLDR: This PR adds millisecond precision to log timestamps to enable more precise analysis of container lifecycles in the enginex simulator in order to explore potential optimizations. It also adds ms resolution to fill & execute.

Add millisecond precision to log timestamps (previously truncated to seconds) and emit one structured, grep-able INFO line per lifecycle phase transition in the enginex simulator:

    ⏱ phase=<name> group=<id> ms=<duration>

Phases bracketed per pre-alloc group cycle:

  • group_start (with idle_ms: xdist dispatch wait since the previous test protocol ended on the worker)
  • fixture_load (test fixture JSON read+parse, cache misses only)
  • pre_alloc_load (pre-alloc group JSON read+parse, cache misses only)
  • genesis_prep (genesis/alloc to_json conversion, cache misses only)
  • genesis_serialize (genesis JSON dump before client start)
  • client_start (hive start-client API call: container create, client boot and check-live wait)
  • client_stop (hive stop-client API call)

Together with the existing per-test START/END lines (now ms-precision) this makes the complete->next-start "teardown gap" between group cycles exactly decomposable from the per-worker log files.

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

cute dog timer

Add millisecond precision to log timestamps (previously truncated to
seconds) and emit one structured, grep-able INFO line per lifecycle
phase transition in the enginex simulator:

    ⏱ phase=<name> group=<id> ms=<duration>

Phases bracketed per pre-alloc group cycle:

- group_start (with idle_ms: xdist dispatch wait since the previous
  test protocol ended on the worker)
- fixture_load (test fixture JSON read+parse, cache misses only)
- pre_alloc_load (pre-alloc group JSON read+parse, cache misses only)
- genesis_prep (genesis/alloc to_json conversion, cache misses only)
- genesis_serialize (genesis JSON dump before client start)
- client_start (hive start-client API call: container create, client
  boot and check-live wait)
- client_stop (hive stop-client API call)

Together with the existing per-test START/END lines (now ms-precision)
this makes the complete->next-start "teardown gap" between group
cycles exactly decomposable from the per-worker log files.
@danceratopz danceratopz added C-feat Category: an improvement or new feature A-test-consume Area: execution_testing.cli.pytest_commands.plugins.consume A-test-logging Area: execution_testing.logging labels Aug 5, 2026
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.49%. Comparing base (f8733cd) to head (6248eee).
⚠️ Report is 4 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3306   +/-   ##
================================================
  Coverage            93.49%   93.49%           
================================================
  Files                  625      624    -1     
  Lines                37039    37056   +17     
  Branches              3392     3394    +2     
================================================
+ Hits                 34630    34647   +17     
  Misses                1653     1653           
  Partials               756      756           
Flag Coverage Δ
unittests 93.49% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-consume Area: execution_testing.cli.pytest_commands.plugins.consume A-test-logging Area: execution_testing.logging C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant