API Reference
This page is auto-generated from Python docstrings.
cintel.rolling_monitor
rolling_monitor.py - Project script (example).
Author: Your Name Here Date: 2026-mm-dd
Time-Series System Metrics Data
- Data is taken from a system that records operational metrics over time.
- Each row represents one observation at a specific timestamp.
- The CSV file includes these columns:
- timestamp: when the observation occurred
- requests: number of requests handled
- errors: number of failed requests
- total_latency_ms: total response time in milliseconds
Purpose
- Read time-series system metrics from a CSV file.
- Demonstrate rolling monitoring using a moving window.
- Compute rolling averages to smooth short-term variation.
- Save the resulting monitoring signals as a CSV artifact.
- Log the pipeline process to assist with debugging and transparency.
Questions to Consider
- How does system behavior change over time?
- Why might a rolling average reveal patterns that individual observations hide?
- How can smoothing short-term variation help us understand longer-term trends?
Paths (relative to repo root)
INPUT FILE: data/system_metrics_timeseries.csv
OUTPUT FILE: artifacts/rolling_metrics.csv
Terminal command to run this file from the root project folder
uv run python -m cintel.rolling_monitor
DESIGN:
Use this file to first learn and then apply your skills.
Reusable functions that do the work are kept in a utils file. We import functions and pass in what they need through their parentheses. Shared utility functions can be imported into a Python module or a reactive marimo notebook app.
Reusable visualization functions may come from sources such as eda-vizkit.
SKILLS:
- Reading CSV files into Polars DataFrames.
- Defining and using constants for window sizes.
- Logging for debugging and transparency.
- Computing rolling averages for time-series analysis.
main
main() -> None
Run the pipeline.
log_header() logs a standard run header. log_path() logs repo-relative paths (privacy-safe).
Source code in src/cintel/rolling_monitor.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |