Analyzer¶
jitterbug.analyzer.JitterbugAnalyzer
¶
Main analyzer class that orchestrates the entire Jitterbug analysis pipeline.
This class coordinates data loading, change point detection, jitter analysis, latency jump detection, and final congestion inference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
JitterbugConfig
|
Configuration object containing all analysis parameters. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
config |
JitterbugConfig
|
Configuration object. |
data_loader |
DataLoader
|
Data loading component. |
change_point_detector |
ChangePointDetector
|
Change point detection component. |
jitter_analyzer |
JitterAnalyzer
|
Jitter analysis component. |
latency_jump_analyzer |
LatencyJumpAnalyzer
|
Latency jump analysis component. |
congestion_inference_analyzer |
CongestionInferenceAnalyzer
|
Congestion inference component. |
analyze_from_file(file_path, file_format=None)
¶
Analyze RTT data from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
Union[str, Path]
|
Path to the RTT data file. |
required |
file_format
|
Optional[str]
|
Format of the file ('csv' or 'json'). If None, it is inferred from the extension, then from the first line. |
None
|
Returns:
| Type | Description |
|---|---|
CongestionInferenceResult
|
Complete analysis results including congestion inferences. |
analyze_from_dataframe(df)
¶
Analyze RTT data from a pandas DataFrame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
DataFrame containing RTT data with columns 'epoch' and 'values'. |
required |
Returns:
| Type | Description |
|---|---|
CongestionInferenceResult
|
Complete analysis results including congestion inferences. |
analyze(rtt_data)
¶
Perform complete Jitterbug analysis on RTT data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rtt_data
|
RTTDataset
|
RTT measurement dataset. |
required |
Returns:
| Type | Description |
|---|---|
CongestionInferenceResult
|
Complete analysis results including congestion inferences. |
save_results(results, output_path, format=None)
¶
Save analysis results to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
CongestionInferenceResult
|
Analysis results to save. |
required |
output_path
|
Union[str, Path]
|
Path to save results to. JSON and CSV are compressed with Zstandard when it
ends in |
required |
format
|
Optional[str]
|
Output format ('json', 'csv', 'parquet'). If None, uses config default. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the format is unknown, or Parquet is requested with a |
ImportError
|
If the path ends in |
get_summary_statistics(results)
¶
Get summary statistics from analysis results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
CongestionInferenceResult
|
Analysis results. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Summary statistics. |