-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyze_logs.py
More file actions
32 lines (22 loc) · 775 Bytes
/
analyze_logs.py
File metadata and controls
32 lines (22 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
from __future__ import annotations
import argparse
from pathlib import Path
from flow_memory_stats import analyze_log_directory, format_log_analysis
DEFAULT_PROJECT_ROOT = Path(__file__).resolve().parent
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Analyze Flow Memory helper logs.")
parser.add_argument(
"--project-root",
default=DEFAULT_PROJECT_ROOT,
type=Path,
help="Project root containing flow_memory_logs/.",
)
return parser.parse_args()
def main() -> int:
args = parse_args()
analysis = analyze_log_directory(args.project_root)
print(format_log_analysis(analysis))
return 0
if __name__ == "__main__":
raise SystemExit(main())