Skip to content

Add stats command for executions and datasets #551

@lewisjared

Description

@lewisjared

Summary

Add a stats subcommand to both the executions and datasets CLI groups to provide a quick operational overview of the current state of the database.

Motivation

Currently, understanding the state of executions or datasets requires eyeballing list-groups or list output. A summary command would give operators a quick dashboard view, especially useful when monitoring long-running evaluation campaigns.

Proposed Commands

ref executions stats

Show counts of executions grouped by status and provider/diagnostic:

Provider     Running  Failed  Successful  Not Started  Dirty
pmp               2       3          45            0      1
esmvaltool        0       1          32            5      5
ilamb             1       0          18            2      0

Should support the same --diagnostic and --provider filters as list-groups.

ref datasets stats

Show counts of datasets grouped by dataset type, with breakdowns by key facets (e.g., source_id, experiment_id):

Dataset Type    Count  Finalised  Unfinalised
cmip6             234        180           54
obs4mips           12         12            0

Acceptance Criteria

  • ref executions stats shows per-provider counts of running/failed/successful/not-started/dirty
  • ref datasets stats shows per-dataset-type counts with finalisation status
  • Both commands support relevant filters (--provider, --diagnostic, etc.)
  • Tests for both commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions