jitterbug-inference 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jitterbug_inference-2.1.1/PKG-INFO +453 -0
- jitterbug_inference-2.1.1/README.md +395 -0
- jitterbug_inference-2.1.1/pyproject.toml +188 -0
- jitterbug_inference-2.1.1/pyproject.toml.orig +177 -0
- jitterbug_inference-2.1.1/src/jitterbug/__init__.py +78 -0
- jitterbug_inference-2.1.1/src/jitterbug/analysis/__init__.py +13 -0
- jitterbug_inference-2.1.1/src/jitterbug/analysis/congestion_inference_analyzer.py +158 -0
- jitterbug_inference-2.1.1/src/jitterbug/analysis/jitter_analyzer.py +303 -0
- jitterbug_inference-2.1.1/src/jitterbug/analysis/latency_jump_analyzer.py +150 -0
- jitterbug_inference-2.1.1/src/jitterbug/analyzer.py +321 -0
- jitterbug_inference-2.1.1/src/jitterbug/cli/__init__.py +7 -0
- jitterbug_inference-2.1.1/src/jitterbug/cli/main.py +543 -0
- jitterbug_inference-2.1.1/src/jitterbug/detection/__init__.py +38 -0
- jitterbug_inference-2.1.1/src/jitterbug/detection/algorithms.py +327 -0
- jitterbug_inference-2.1.1/src/jitterbug/detection/change_point_detector.py +147 -0
- jitterbug_inference-2.1.1/src/jitterbug/io/__init__.py +11 -0
- jitterbug_inference-2.1.1/src/jitterbug/io/data_loader.py +467 -0
- jitterbug_inference-2.1.1/src/jitterbug/io/exporters.py +168 -0
- jitterbug_inference-2.1.1/src/jitterbug/models/__init__.py +36 -0
- jitterbug_inference-2.1.1/src/jitterbug/models/analysis.py +272 -0
- jitterbug_inference-2.1.1/src/jitterbug/models/config.py +294 -0
- jitterbug_inference-2.1.1/src/jitterbug/models/rtt_data.py +208 -0
- jitterbug_inference-2.1.1/src/jitterbug/py.typed +2 -0
- jitterbug_inference-2.1.1/src/jitterbug/visualization/__init__.py +7 -0
- jitterbug_inference-2.1.1/src/jitterbug/visualization/plotter.py +647 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: jitterbug-inference
|
|
3
|
+
Version: 2.1.1
|
|
4
|
+
Summary: Framework for jitter-based network congestion inference
|
|
5
|
+
Keywords: network,congestion,rtt,jitter,analysis,changepoint,detection
|
|
6
|
+
Author: Esteban Carisimo
|
|
7
|
+
Author-email: Esteban Carisimo <esteban.carisimo@northwestern.edu>
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
19
|
+
Classifier: Topic :: System :: Networking :: Monitoring
|
|
20
|
+
Classifier: Topic :: Internet :: Log Analysis
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Dist: numpy>=1.24
|
|
23
|
+
Requires-Dist: pandas>=2.0
|
|
24
|
+
Requires-Dist: scipy>=1.10
|
|
25
|
+
Requires-Dist: pydantic>=2.5
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.1
|
|
27
|
+
Requires-Dist: ruptures>=1.1.9
|
|
28
|
+
Requires-Dist: typer>=0.12
|
|
29
|
+
Requires-Dist: rich>=13.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: bayesian-changepoint>=1.2 ; extra == 'all'
|
|
32
|
+
Requires-Dist: torch>=2.0 ; extra == 'all'
|
|
33
|
+
Requires-Dist: influxdb-client>=1.30.0 ; extra == 'all'
|
|
34
|
+
Requires-Dist: matplotlib>=3.5.0 ; extra == 'all'
|
|
35
|
+
Requires-Dist: ipykernel>=6.0.0 ; extra == 'all'
|
|
36
|
+
Requires-Dist: jupyter>=1.0.0 ; extra == 'all'
|
|
37
|
+
Requires-Dist: jitterbug-inference[bcp] ; extra == 'bayesian'
|
|
38
|
+
Requires-Dist: bayesian-changepoint>=1.2 ; extra == 'bcp'
|
|
39
|
+
Requires-Dist: torch>=2.0 ; extra == 'bcp'
|
|
40
|
+
Requires-Dist: influxdb-client>=1.30.0 ; extra == 'influx'
|
|
41
|
+
Requires-Dist: ipykernel>=6.0.0 ; extra == 'jupyter'
|
|
42
|
+
Requires-Dist: jupyter>=1.0.0 ; extra == 'jupyter'
|
|
43
|
+
Requires-Dist: matplotlib>=3.5.0 ; extra == 'visualization'
|
|
44
|
+
Maintainer: Esteban Carisimo
|
|
45
|
+
Maintainer-email: Esteban Carisimo <esteban.carisimo@northwestern.edu>
|
|
46
|
+
Requires-Python: >=3.10
|
|
47
|
+
Project-URL: Homepage, https://github.com/estcarisimo/jitterbug
|
|
48
|
+
Project-URL: Repository, https://github.com/estcarisimo/jitterbug
|
|
49
|
+
Project-URL: Bug Reports, https://github.com/estcarisimo/jitterbug/issues
|
|
50
|
+
Project-URL: Documentation, https://github.com/estcarisimo/jitterbug/blob/main/README.md
|
|
51
|
+
Provides-Extra: all
|
|
52
|
+
Provides-Extra: bayesian
|
|
53
|
+
Provides-Extra: bcp
|
|
54
|
+
Provides-Extra: influx
|
|
55
|
+
Provides-Extra: jupyter
|
|
56
|
+
Provides-Extra: visualization
|
|
57
|
+
Description-Content-Type: text/markdown
|
|
58
|
+
|
|
59
|
+
# π Jitterbug
|
|
60
|
+
|
|
61
|
+
A Python framework for inferring Internet path congestion from Round-Trip Time (RTT) measurements. Jitterbug splits an RTT time series at change points, then classifies each period as congested or not by combining a latency-jump test with a jitter test (jitter dispersion or KolmogorovβSmirnov). It implements the method from *Jitterbug: A New Framework for Jitter-Based Congestion Inference* (PAM 2022) and ships the paper's dataset so you can reproduce it in one command.
|
|
62
|
+
|
|
63
|
+
[](https://pypi.org/project/jitterbug-inference/)
|
|
64
|
+
[](https://github.com/estcarisimo/jitterbug/actions/workflows/ci.yml)
|
|
65
|
+
[](https://www.python.org/downloads/)
|
|
66
|
+
[](https://opensource.org/licenses/MIT)
|
|
67
|
+
[](https://github.com/astral-sh/ruff)
|
|
68
|
+
|
|
69
|
+
## β¨ Features
|
|
70
|
+
|
|
71
|
+
- π **Congestion inference from RTTs alone**: no active probing beyond the pings you already have
|
|
72
|
+
- π **Pluggable change point detection**: `ruptures` out of the box, the paper's Bayesian detector (`bcp`) as an extra
|
|
73
|
+
- π **Two jitter tests**: jitter dispersion (moving IQR + moving average) or a KolmogorovβSmirnov test between periods
|
|
74
|
+
- π **Multiple input formats**: CSV, scamper JSON, and InfluxDB queries
|
|
75
|
+
- π **Rich terminal output**: summary and per-period tables, plus JSON or CSV results files
|
|
76
|
+
- βοΈ **Typed configuration**: Pydantic models, YAML/JSON config files, `JITTERBUG_*` environment variables
|
|
77
|
+
- π§ͺ **Reproducible**: the PAM 2022 dataset (47 163 measurements) and its reference results are bundled
|
|
78
|
+
- π **Library and CLI**: use `jitterbug analyze` or call `JitterbugAnalyzer` from your own code
|
|
79
|
+
|
|
80
|
+
## π Quick Start
|
|
81
|
+
|
|
82
|
+
### Installation
|
|
83
|
+
|
|
84
|
+
From PyPI:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install jitterbug-inference # core: ruptures detector, CLI, library
|
|
88
|
+
pip install "jitterbug-inference[bcp]" # + the paper's Bayesian detector
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> The distribution is named `jitterbug-inference` because `jitterbug` on PyPI is an
|
|
92
|
+
> unrelated project; the import is `import jitterbug` and the command is `jitterbug`.
|
|
93
|
+
> `pip install jitterbug` installs the wrong package.
|
|
94
|
+
|
|
95
|
+
For development, clone and use [uv](https://docs.astral.sh/uv/):
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone https://github.com/estcarisimo/jitterbug.git
|
|
99
|
+
cd jitterbug
|
|
100
|
+
uv sync
|
|
101
|
+
source .venv/bin/activate # or prefix every command below with `uv run`
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
See [docs/INSTALLATION.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/INSTALLATION.md) for pip from a clone, pinned versions and troubleshooting.
|
|
105
|
+
|
|
106
|
+
### Optional back ends
|
|
107
|
+
|
|
108
|
+
| Extra | Installs | Use it for |
|
|
109
|
+
| --- | --- | --- |
|
|
110
|
+
| `bcp` | [bayesian-changepoint](https://pypi.org/project/bayesian-changepoint/) + torch | The Bayesian detector used in the paper |
|
|
111
|
+
| `influx` | influxdb-client | Loading RTTs straight from InfluxDB |
|
|
112
|
+
| `visualization` | matplotlib | `jitterbug visualize` and the plotting helpers |
|
|
113
|
+
| `all` | everything above | |
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
pip install "jitterbug-inference[bcp,visualization]" # the paper's setup plus figures
|
|
117
|
+
uv sync --extra all # from a clone: everything
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### System requirements
|
|
121
|
+
|
|
122
|
+
- Python 3.10 or higher
|
|
123
|
+
|
|
124
|
+
## π Usage
|
|
125
|
+
|
|
126
|
+
### Analyze a file
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Print the summary and the congestion periods found in the bundled dataset
|
|
130
|
+
jitterbug analyze examples/network_analysis/data/raw.csv
|
|
131
|
+
|
|
132
|
+
# Save the full results
|
|
133
|
+
jitterbug analyze examples/network_analysis/data/raw.csv --output results.json
|
|
134
|
+
|
|
135
|
+
# Reproduce the paper: Bayesian change points + KS test (needs `uv sync --extra bcp`)
|
|
136
|
+
jitterbug analyze examples/network_analysis/data/raw.csv --algorithm bcp --method ks_test
|
|
137
|
+
|
|
138
|
+
# Only the summary table
|
|
139
|
+
jitterbug analyze examples/network_analysis/data/raw.csv --summary-only
|
|
140
|
+
|
|
141
|
+
# CSV instead of JSON (Parquet is also supported if `pyarrow` is installed)
|
|
142
|
+
jitterbug analyze rtts.csv --output results.csv --output-format csv
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Validate input before analyzing
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
jitterbug validate rtts.csv --verbose
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Plot the analysis
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Five PNG figures (raw RTT, minimum RTT, change points, verdicts, confidence) at 300 dpi;
|
|
155
|
+
# needs `uv sync --extra visualization`
|
|
156
|
+
jitterbug visualize examples/network_analysis/data/raw.csv --output-dir plots
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The figures are described in [docs/VISUALIZATION_USAGE.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/VISUALIZATION_USAGE.md), together with the `JitterbugPlotter` API for your own scripts.
|
|
160
|
+
|
|
161
|
+
### Configuration files
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Write a template with every option and its default
|
|
165
|
+
jitterbug config --template --output config.yaml
|
|
166
|
+
|
|
167
|
+
# Use it
|
|
168
|
+
jitterbug analyze rtts.csv --config config.yaml
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Additional commands
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
jitterbug version
|
|
175
|
+
jitterbug --help
|
|
176
|
+
jitterbug analyze --help
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Python API
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
from pathlib import Path
|
|
183
|
+
|
|
184
|
+
from jitterbug import JitterbugAnalyzer, JitterbugConfig
|
|
185
|
+
|
|
186
|
+
config = JitterbugConfig() # or JitterbugConfig.from_file(Path("config.yaml"))
|
|
187
|
+
analyzer = JitterbugAnalyzer(config)
|
|
188
|
+
|
|
189
|
+
results = analyzer.analyze_from_file("examples/network_analysis/data/raw.csv")
|
|
190
|
+
|
|
191
|
+
for period in results.get_congested_periods():
|
|
192
|
+
print(period.start_timestamp, period.end_timestamp, period.confidence)
|
|
193
|
+
|
|
194
|
+
summary = analyzer.get_summary_statistics(results)
|
|
195
|
+
print(
|
|
196
|
+
f"{summary['congested_periods']} congested periods, "
|
|
197
|
+
f"{summary['congestion_duration_seconds']:.0f} s in total"
|
|
198
|
+
)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
`analyze_from_dataframe(df)` accepts a pandas DataFrame with `epoch` and `values` columns, and `analyze(dataset)` an `RTTDataset` you built yourself.
|
|
202
|
+
|
|
203
|
+
### Input formats
|
|
204
|
+
|
|
205
|
+
The contract (columns, units, ordering, what is dropped) is in [docs/INPUT_FORMATS.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/INPUT_FORMATS.md).
|
|
206
|
+
|
|
207
|
+
**CSV**: one RTT sample per row, epoch seconds and milliseconds.
|
|
208
|
+
|
|
209
|
+
```csv
|
|
210
|
+
epoch,values
|
|
211
|
+
1512144010.0,63.86
|
|
212
|
+
1512144010.0,66.52
|
|
213
|
+
1512144020.0,85.2
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**scamper JSON** (`ping` records, one per line):
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{"type":"ping","src":"192.168.1.1","dst":"8.8.8.8","responses":[{"rtt":1.712,"tx":{"sec":1752855461,"usec":719258}}]}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**InfluxDB** (`uv sync --extra influx`):
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
from jitterbug.io import DataLoader
|
|
226
|
+
|
|
227
|
+
dataset = DataLoader().load_from_influxdb(
|
|
228
|
+
url="http://localhost:8086",
|
|
229
|
+
token="...",
|
|
230
|
+
org="my-org",
|
|
231
|
+
bucket="network-metrics",
|
|
232
|
+
query='from(bucket:"network-metrics") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "rtt")',
|
|
233
|
+
)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## π§ Configuration
|
|
237
|
+
|
|
238
|
+
Every option lives in a Pydantic model and can be set from a YAML/JSON file or from the CLI flags. `jitterbug config --template` prints the full set; the important ones:
|
|
239
|
+
|
|
240
|
+
```yaml
|
|
241
|
+
change_point_detection:
|
|
242
|
+
algorithm: ruptures # ruptures | bcp
|
|
243
|
+
threshold: 0.25
|
|
244
|
+
min_time_elapsed: 1800 # seconds between change points
|
|
245
|
+
ruptures_model: rbf
|
|
246
|
+
ruptures_penalty: 10.0
|
|
247
|
+
|
|
248
|
+
jitter_analysis:
|
|
249
|
+
method: jitter_dispersion # jitter_dispersion | ks_test
|
|
250
|
+
threshold: 0.25
|
|
251
|
+
moving_average_order: 6
|
|
252
|
+
moving_iqr_order: 4
|
|
253
|
+
significance_level: 0.05
|
|
254
|
+
|
|
255
|
+
latency_jump:
|
|
256
|
+
threshold: 0.5 # minimum-RTT increase (ms) that counts as a jump
|
|
257
|
+
|
|
258
|
+
data_processing:
|
|
259
|
+
minimum_interval_minutes: 15 # width of the minimum-RTT intervals
|
|
260
|
+
outlier_detection: true
|
|
261
|
+
outlier_threshold: 3.0
|
|
262
|
+
|
|
263
|
+
output_format: json # json | csv | parquet (parquet needs pyarrow)
|
|
264
|
+
verbose: false
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Top-level options can also come from environment variables with the `JITTERBUG_` prefix:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
export JITTERBUG_VERBOSE=true
|
|
271
|
+
export JITTERBUG_OUTPUT_FORMAT=csv
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### How the analysis works
|
|
275
|
+
|
|
276
|
+
1. **Minimum-RTT intervals**: the raw samples are binned (15 min by default) and the minimum of each bin is kept, which removes most queueing noise.
|
|
277
|
+
2. **Change point detection** on the minimum-RTT series marks the boundaries between periods.
|
|
278
|
+
3. **Latency jump**: a period is a candidate if its mean minimum RTT rises above the previous period's by more than `latency_jump.threshold`.
|
|
279
|
+
4. **Jitter test**: jitter dispersion (variance of the filtered jitter series) or a KS test of the RTT distributions on both sides of the change point.
|
|
280
|
+
5. **Congestion inference**: a period is congested when both tests agree; each result carries a confidence and the evidence behind it.
|
|
281
|
+
|
|
282
|
+
`ruptures` and `bcp` are the two detectors evaluated in the paper; see [docs/ALGORITHM_SELECTION_GUIDE.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/ALGORITHM_SELECTION_GUIDE.md) for when to use which.
|
|
283
|
+
|
|
284
|
+
## ποΈ Architecture
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
src/jitterbug/
|
|
288
|
+
βββ analyzer.py # JitterbugAnalyzer: orchestrates the pipeline below
|
|
289
|
+
βββ models/ # Pydantic models
|
|
290
|
+
β βββ rtt_data.py # RTTMeasurement, RTTDataset, MinimumRTTDataset
|
|
291
|
+
β βββ analysis.py # ChangePoint, LatencyJump, JitterAnalysis, CongestionInference
|
|
292
|
+
β βββ config.py # JitterbugConfig and the per-stage configs (BaseSettings)
|
|
293
|
+
βββ detection/ # Change point detection
|
|
294
|
+
β βββ change_point_detector.py # dispatch on config.algorithm
|
|
295
|
+
β βββ algorithms.py # RupturesDetector, BayesianChangePointDetector (bcp)
|
|
296
|
+
βββ analysis/ # Period classification
|
|
297
|
+
β βββ latency_jump_analyzer.py
|
|
298
|
+
β βββ jitter_analyzer.py # jitter dispersion and KS test
|
|
299
|
+
β βββ congestion_inference_analyzer.py
|
|
300
|
+
βββ io/ # DataLoader (CSV, scamper JSON, InfluxDB) and exporters
|
|
301
|
+
βββ cli/main.py # Typer CLI: analyze, validate, config, visualize, version
|
|
302
|
+
βββ visualization/ # JitterbugPlotter (matplotlib): the figures behind `jitterbug visualize`
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Bundled data: `examples/network_analysis/data/raw.csv` is the PAM 2022 dataset, and `examples/network_analysis/expected_results/` holds the paper's reference output for both jitter methods.
|
|
306
|
+
|
|
307
|
+
## π§ͺ Development
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Clone repository
|
|
311
|
+
git clone https://github.com/estcarisimo/jitterbug.git
|
|
312
|
+
cd jitterbug
|
|
313
|
+
|
|
314
|
+
# Environment with the dev tools (the `dev` dependency group is installed by default)
|
|
315
|
+
uv sync --extra visualization
|
|
316
|
+
|
|
317
|
+
# Install pre-commit hooks (ruff lint + format on staged files)
|
|
318
|
+
uv run pre-commit install
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Running tests
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
uv run pytest
|
|
325
|
+
uv run pytest --cov=jitterbug --cov-report=term-missing
|
|
326
|
+
uv run pytest tests/test_cli.py -v
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
The fast suite runs in about twenty seconds and needs no network; the Bayesian regression tests (`-m slow`) add about two seconds and need the `bcp` extra. Coverage is about 90 % and CI fails below 75 %.
|
|
330
|
+
|
|
331
|
+
### Code quality
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
uv run ruff check src/ tests/ examples/ tools/
|
|
335
|
+
uv run ruff format src/ tests/ examples/ tools/
|
|
336
|
+
uv run mypy src/jitterbug
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
`ruff check`, `ruff format --check` and `mypy` are all enforced in CI. See [CONTRIBUTING.md](https://github.com/estcarisimo/jitterbug/blob/main/CONTRIBUTING.md) for the pull request workflow.
|
|
340
|
+
|
|
341
|
+
### Building
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
uv build
|
|
345
|
+
uv pip install dist/*.whl
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## π Example Output
|
|
349
|
+
|
|
350
|
+
`jitterbug analyze examples/network_analysis/data/raw.csv` with the default `ruptures` detector:
|
|
351
|
+
|
|
352
|
+
```text
|
|
353
|
+
π Analysis Summary
|
|
354
|
+
βββββββββββββββββββββββ¬βββββββββββββ
|
|
355
|
+
β Total Periods β 22 β
|
|
356
|
+
β Congested Periods β 11 β
|
|
357
|
+
β Congestion Ratio β 24.44% β
|
|
358
|
+
β Total Duration β 1197000.0s β
|
|
359
|
+
β Congestion Duration β 292497.0s β
|
|
360
|
+
β Average Confidence β 0.90 β
|
|
361
|
+
βββββββββββββββββββββββ΄βββββββββββββ
|
|
362
|
+
|
|
363
|
+
π Congestion Periods
|
|
364
|
+
βββββββββββββββ³ββββββββββββββ³βββββββββββ³βββββββββββββ³βββββββββββββ³ββββββββββββββ
|
|
365
|
+
β β β β β Latency β Jitter β
|
|
366
|
+
β Start (UTC) β End (UTC) β Duration β Confidence β Jump β Change β
|
|
367
|
+
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
|
|
368
|
+
β 2017-12-02 β 2017-12-02 β 27000.0s β 0.90 β β β β β
|
|
369
|
+
β 12:00:10 β 19:30:10 β β β β β
|
|
370
|
+
β 2017-12-03 β 2017-12-03 β 27000.0s β 0.90 β β β β β
|
|
371
|
+
β 11:45:09 β 19:15:09 β β β β β
|
|
372
|
+
β 2017-12-04 β 2017-12-04 β 18000.0s β 0.90 β β β β β
|
|
373
|
+
β 14:00:10 β 19:00:10 β β β β β
|
|
374
|
+
β ... β ... β β β β β
|
|
375
|
+
βββββββββββββββ΄ββββββββββββββ΄βββββββββββ΄βββββββββββββ΄βββββββββββββ΄ββββββββββββββ
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
The dataset shows the daily congestion episodes the paper analyzes. With the Bayesian detector and the KS test (`--algorithm bcp --method ks_test`) the output matches the reference in `examples/network_analysis/expected_results/`:
|
|
379
|
+
|
|
380
|
+

|
|
381
|
+
|
|
382
|
+
Each entry in `results.json` carries the period, the verdict, and the evidence:
|
|
383
|
+
|
|
384
|
+
```json
|
|
385
|
+
{
|
|
386
|
+
"start_timestamp": "2017-12-02 12:00:10+00:00",
|
|
387
|
+
"end_timestamp": "2017-12-02 19:30:10+00:00",
|
|
388
|
+
"is_congested": true,
|
|
389
|
+
"confidence": 0.9,
|
|
390
|
+
"latency_jump": {"has_jump": true, "magnitude": 20.62, "threshold": 0.5},
|
|
391
|
+
"jitter_analysis": {"method": "jitter_dispersion", "has_significant_jitter": true, "jitter_metric": 14.55}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## π€ Contributing
|
|
396
|
+
|
|
397
|
+
Contributions are welcome! Please see the [Contributing Guide](https://github.com/estcarisimo/jitterbug/blob/main/CONTRIBUTING.md) for the development setup, the checks every change must pass, and the pull request workflow.
|
|
398
|
+
|
|
399
|
+
1. Fork the repository
|
|
400
|
+
2. Create a feature branch (`git switch -c feat/amazing-feature`)
|
|
401
|
+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
402
|
+
4. Push to the branch (`git push origin feat/amazing-feature`)
|
|
403
|
+
5. Open a Pull Request
|
|
404
|
+
|
|
405
|
+
### Project documentation
|
|
406
|
+
|
|
407
|
+
| Document | Contents |
|
|
408
|
+
| --- | --- |
|
|
409
|
+
| [CONTRIBUTING.md](https://github.com/estcarisimo/jitterbug/blob/main/CONTRIBUTING.md) | Development setup, workflow, PR expectations |
|
|
410
|
+
| [CHANGELOG.md](https://github.com/estcarisimo/jitterbug/blob/main/CHANGELOG.md) | Release history |
|
|
411
|
+
| [AGENTS.md](https://github.com/estcarisimo/jitterbug/blob/main/AGENTS.md) | Guidance for AI coding agents working in this repo |
|
|
412
|
+
| [SECURITY.md](https://github.com/estcarisimo/jitterbug/blob/main/SECURITY.md) | Vulnerability reporting, and what data this tool handles |
|
|
413
|
+
| [CODE_OF_CONDUCT.md](https://github.com/estcarisimo/jitterbug/blob/main/CODE_OF_CONDUCT.md) | Community standards |
|
|
414
|
+
| [docs/INSTALLATION.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/INSTALLATION.md) | Installation details and troubleshooting |
|
|
415
|
+
| [docs/INPUT_FORMATS.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/INPUT_FORMATS.md) | Input contract: CSV, scamper JSON, DataFrame, InfluxDB |
|
|
416
|
+
| [docs/ALGORITHM_SELECTION_GUIDE.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/ALGORITHM_SELECTION_GUIDE.md) | Choosing a change point detector |
|
|
417
|
+
| [docs/ALGORITHM_USAGE.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/ALGORITHM_USAGE.md) | Per-detector options and examples |
|
|
418
|
+
| [docs/VISUALIZATION_USAGE.md](https://github.com/estcarisimo/jitterbug/blob/main/docs/VISUALIZATION_USAGE.md) | `jitterbug visualize`, the five figures, `JitterbugPlotter` |
|
|
419
|
+
| [examples/README.md](https://github.com/estcarisimo/jitterbug/blob/main/examples/README.md) | Scripts and notebooks |
|
|
420
|
+
|
|
421
|
+
## π License
|
|
422
|
+
|
|
423
|
+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/estcarisimo/jitterbug/blob/main/LICENSE) file for details.
|
|
424
|
+
|
|
425
|
+
## π Related Resources
|
|
426
|
+
|
|
427
|
+
- [Jitterbug paper (PAM 2022)](https://doi.org/10.1007/978-3-030-98785-5_7)
|
|
428
|
+
- [bayesian_changepoint_detection](https://github.com/estcarisimo/bayesian_changepoint_detection): the Bayesian detector behind the `bcp` extra
|
|
429
|
+
- [ruptures](https://centre-borelli.github.io/ruptures-docs/): the default change point library
|
|
430
|
+
- [scamper](https://www.caida.org/catalog/software/scamper/): the measurement tool whose JSON output Jitterbug reads
|
|
431
|
+
|
|
432
|
+
## π Acknowledgements
|
|
433
|
+
|
|
434
|
+
Jitterbug is the software behind the following paper. If you use it in your research, please cite it (also available as [CITATION.cff](https://github.com/estcarisimo/jitterbug/blob/main/CITATION.cff) for GitHub's "Cite this repository" button):
|
|
435
|
+
|
|
436
|
+
**Paper**: *"Jitterbug: A New Framework for Jitter-Based Congestion Inference"*
|
|
437
|
+
**Authors**: Esteban Carisimo, Ricky K. P. Mok, David D. Clark, and K. C. Claffy
|
|
438
|
+
**Conference**: Passive and Active Measurement (PAM), March 2022
|
|
439
|
+
**Link**: [https://doi.org/10.1007/978-3-030-98785-5_7](https://doi.org/10.1007/978-3-030-98785-5_7)
|
|
440
|
+
|
|
441
|
+
```bibtex
|
|
442
|
+
@InProceedings{carisimo2022jitterbug,
|
|
443
|
+
author = {Carisimo, Esteban and Mok, Ricky K. P. and Clark, David D. and Claffy, K. C.},
|
|
444
|
+
title = {Jitterbug: A New Framework for Jitter-Based Congestion Inference},
|
|
445
|
+
booktitle = {Passive and Active Measurement},
|
|
446
|
+
year = {2022},
|
|
447
|
+
publisher = {Springer International Publishing},
|
|
448
|
+
pages = {155--179},
|
|
449
|
+
doi = {10.1007/978-3-030-98785-5_7}
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
Thanks to the authors of `ruptures` and `bayesian_changepoint_detection` for the libraries this framework builds on.
|