Format benchmark results according to requested format. Args: results: Benchmark results dictionary format_type: Output format ('text', 'markdown', or 'json') is_antagonistic: Whether these are antagonistic (DoS) test results Returns: Formatted output string
(results: Dict[str, Dict[str, Any]], format_type: str, is_antagonistic: bool)
| 79 | |
| 80 | |
| 81 | def _format_output(results: Dict[str, Dict[str, Any]], format_type: str, is_antagonistic: bool) -> str: |
| 82 | """Format benchmark results according to requested format. |
| 83 | |
| 84 | Args: |
| 85 | results: Benchmark results dictionary |
| 86 | format_type: Output format ('text', 'markdown', or 'json') |
| 87 | is_antagonistic: Whether these are antagonistic (DoS) test results |
| 88 | |
| 89 | Returns: |
| 90 | Formatted output string |
| 91 | """ |
| 92 | if format_type == 'json': |
| 93 | return Reporter.format_json(results) |
| 94 | elif is_antagonistic: |
| 95 | # Antagonistic mode uses specialized formatter for text/markdown |
| 96 | return Reporter.format_antagonistic(results) |
| 97 | elif format_type == 'text': |
| 98 | return Reporter.format_text(results) |
| 99 | elif format_type == 'markdown': |
| 100 | return Reporter.format_markdown(results) |
| 101 | else: |
| 102 | # Default to text format |
| 103 | return Reporter.format_text(results) |
| 104 | |
| 105 | |
| 106 | class AntagonisticGenerator: |
no test coverage detected
searching dependent graphs…