Skip to content

Log start and per-entry timing for each WorkTracker phase - #329

Merged
jp-spotter merged 1 commit into
thoughtspot:devfrom
jp-spotter:feat/phase-progress-logging
Jul 23, 2026
Merged

Log start and per-entry timing for each WorkTracker phase#329
jp-spotter merged 1 commit into
thoughtspot:devfrom
jp-spotter:feat/phase-progress-logging

Conversation

@jp-spotter

Copy link
Copy Markdown
Collaborator

Every WorkTracker phase now logs a start line and a timed end line:

→ Fetching COLUMN data
✓ Fetching COLUMN data (12.3s)

One hook in WorkTask.__enter__/__exit__, so it applies to every tool that uses the tracker;
failed phases log ✗ … failed after Ns. A long run narrates itself instead of being a black box,
and the per-phase timing doubles as a free profiler.

Correctness detail: it logs each entry's own duration, not the cumulative self.elapsed — the
metadata command re-enters the same task once per org, so cumulative would be wrong. Rich markup and
indentation are stripped for clean log lines.

Rides the existing logging config (console INFO + persistent .logs/). No behavior change beyond
the added lines. Tests in tests/test_progress.py cover start/timed-end, the per-entry re-entry
duration, and the failure path.

@jp-spotter
jp-spotter requested a review from a team as a code owner July 23, 2026 19:22
@jp-spotter
jp-spotter merged commit 4b6063f into thoughtspot:dev Jul 23, 2026
3 checks passed
@jp-spotter
jp-spotter deleted the feat/phase-progress-logging branch July 24, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant