!19 fix(parse_results): 不再把 raw_requests 嵌入 results.json,避免 8.5MB 膨胀

Merge pull request !19 from Zhiyi Hong/auto/main/11665927/2a47b692-1
This commit is contained in:
Quantong Qiu 2026-07-21 10:07:16 +00:00 committed by Gitee
commit 059eb2521c
3 changed files with 3 additions and 6 deletions

View File

@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
if log_file.exists(): if log_file.exists():
summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace"))
raw_requests, aggregates = parse_jsonl(raw_file) _, aggregates = parse_jsonl(raw_file)
# For newer sglang aggregate JSON, success/failed are not present in the # For newer sglang aggregate JSON, success/failed are not present in the
# raw output file. Override them from the human-readable summary log when # raw output file. Override them from the human-readable summary log when
@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
"total_token_throughput": summary.get("total_token_throughput"), "total_token_throughput": summary.get("total_token_throughput"),
"accept_length": None, "accept_length": None,
"latencies": aggregates["latencies"], "latencies": aggregates["latencies"],
"raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None,
} }
return scenario return scenario

View File

@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
if log_file.exists(): if log_file.exists():
summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace"))
raw_requests, aggregates = parse_jsonl(raw_file) _, aggregates = parse_jsonl(raw_file)
# For newer sglang aggregate JSON, success/failed are not present in the # For newer sglang aggregate JSON, success/failed are not present in the
# raw output file. Override them from the human-readable summary log when # raw output file. Override them from the human-readable summary log when
@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
"total_token_throughput": summary.get("total_token_throughput"), "total_token_throughput": summary.get("total_token_throughput"),
"accept_length": None, "accept_length": None,
"latencies": aggregates["latencies"], "latencies": aggregates["latencies"],
"raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None,
} }
return scenario return scenario

View File

@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
if log_file.exists(): if log_file.exists():
summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace"))
raw_requests, aggregates = parse_jsonl(raw_file) _, aggregates = parse_jsonl(raw_file)
# For newer sglang aggregate JSON, success/failed are not present in the # For newer sglang aggregate JSON, success/failed are not present in the
# raw output file. Override them from the human-readable summary log when # raw output file. Override them from the human-readable summary log when
@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None:
"total_token_throughput": summary.get("total_token_throughput"), "total_token_throughput": summary.get("total_token_throughput"),
"accept_length": None, "accept_length": None,
"latencies": aggregates["latencies"], "latencies": aggregates["latencies"],
"raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None,
} }
return scenario return scenario