Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Metrics Schema

The ci_test_metrics datasource stores all events. The schema is sorted by (timestamp, test_nodeid).

Event Types

Every record has an event_type field. The plugin emits three types:

Event Typetest_nodeidWhen
session_start__session__Beginning of the pytest session
testFull node ID (e.g. tests/test_example.py::test_one)After each test’s teardown
session_end__session__End of the pytest session

Full Schema

FieldTypeDescriptionEvents
event_typeStringsession_start, test, or session_endall
test_nodeidStringTest node ID or __session__all
timestampDateTime64(3)UTC timestamp (ISO 8601)all
batch_numInt32Batch sequence numbertest
duration_sFloat64Test wall-clock duration in secondstest
cpu_beforeFloat64CPU usage % before testtest
cpu_afterFloat64CPU usage % after testtest
cpu_countInt32Logical CPU countsession_start, session_end
mem_total_bytesInt64Total physical memory in bytessession_start, session_end
mem_available_beforeInt64Available memory before test (bytes)test
mem_available_afterInt64Available memory after test (bytes)test
mem_percent_beforeFloat64Memory usage % before testtest
mem_percent_afterFloat64Memory usage % after testtest
disk_total_bytesInt64Total disk space in bytessession_start, session_end
disk_free_beforeInt64Free disk space before test (bytes)test
disk_free_afterInt64Free disk space after test (bytes)test
disk_percent_beforeFloat64Disk usage % before testtest
disk_percent_afterFloat64Disk usage % after testtest
exit_statusInt32Pytest exit codesession_end
gh_run_idStringGitHub Actions run IDall
gh_shaStringGit commit SHAall
gh_ref_nameStringBranch or tag nameall
gh_workflowStringWorkflow nameall
gh_jobStringJob IDall
gh_actorStringActor who triggered the runall
gh_repositoryStringRepository (owner/repo)all
gh_run_attemptStringRun attempt numberall