Skip to content

Feature: Show queue health stats with docket snapshot#147

Merged
chrisguidry merged 2 commits intochrisguidry:mainfrom
abrookins:feature/more-queue-health
Jul 11, 2025
Merged

Feature: Show queue health stats with docket snapshot#147
chrisguidry merged 2 commits intochrisguidry:mainfrom
abrookins:feature/more-queue-health

Conversation

@abrookins
Copy link
Collaborator

Adds a --stats option to docket snapshot that prints a table of stats at the end of the snapshot list. E.g.:

                                          Task Count Statistics by Function
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Function                  ┃ Total ┃ Running ┃ Queued ┃                Oldest Queued ┃                Latest Queued ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ extract_memory_structure  │   511 │       9 │    502 │ at 2025-07-09 11:22:51 -0700 │ at 2025-07-09 11:24:14 -0700 │
│ extract_discrete_memories │    16 │       1 │     15 │ at 2025-07-09 11:22:51 -0700 │ at 2025-07-09 11:24:14 -0700 │
│ index_long_term_memories  │     1 │       0 │      1 │ at 2025-07-10 10:20:53 -0700 │ at 2025-07-10 10:20:53 -0700 │
└───────────────────────────┴───────┴─────────┴────────┴──────────────────────────────┴──────────────────────────────┘

Copy link
Owner

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

Love it!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (977b99e) to head (6102107).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main      #147    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           28        28            
  Lines         3570      3675   +105     
  Branches       191       205    +14     
==========================================
+ Hits          3570      3675   +105     
Flag Coverage Δ
python-3.12 100.00% <100.00%> (ø)
python-3.13 100.00% <100.00%> (ø)

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

Files with missing lines Coverage Δ
src/docket/cli.py 100.00% <100.00%> (ø)
tests/cli/test_snapshot.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisguidry
Copy link
Owner

Don't worry about that failing docs check, I need to debug that, looks great!

@chrisguidry chrisguidry merged commit 91faaa3 into chrisguidry:main Jul 11, 2025
16 of 18 checks passed
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.

3 participants