|
4 | 4 | import os |
5 | 5 | from dataclasses import dataclass |
6 | 6 | from datetime import datetime |
7 | | -from sre_compile import REPEAT_ONE |
8 | 7 | from typing import Any, Dict, List, Optional, Tuple |
9 | 8 |
|
10 | 9 | import pandas as pd |
@@ -139,6 +138,7 @@ def argparser(): |
139 | 138 |
|
140 | 139 | return parser.parse_args() |
141 | 140 |
|
| 141 | + |
142 | 142 | class ExecutorchBenchmarkFetcher: |
143 | 143 | """ |
144 | 144 | Fetch and process benchmark data from HUD API for ExecutorchBenchmark. |
@@ -395,23 +395,36 @@ def _get_base_url(self) -> str: |
395 | 395 | def print_all_names(self) -> None: |
396 | 396 | """ |
397 | 397 | Print all benchmark table names found in the data. |
398 | | -
|
399 | 398 | Separates results by device type (public/private) and displays counts. |
400 | 399 | This is useful for debugging and understanding what data is available. |
401 | 400 | """ |
402 | 401 | if not self.data: |
403 | 402 | return |
404 | 403 | logging.info("peeking table result:") |
405 | 404 | logging.info(json.dumps(self.data[0], indent=2)) |
406 | | - names = [item["table_name"] for item in self.data] |
| 405 | + public_ones = [ |
| 406 | + item["table_name"] |
| 407 | + for item in self.data |
| 408 | + if item["groupInfo"]["aws_type"] == "public" |
| 409 | + ] |
| 410 | + private_ones = [ |
| 411 | + item["table_name"] |
| 412 | + for item in self.data |
| 413 | + if item["groupInfo"]["aws_type"] == "private" |
| 414 | + ] |
407 | 415 | # Print all found benchmark table names |
408 | 416 | logging.info( |
409 | | - "\n============List all benchmark result table names =================\n" |
| 417 | + "\n============List all benchmark result table names (Public and Private) below =================\n" |
410 | 418 | ) |
411 | 419 | logging.info( |
412 | | - f"\n============ public device benchmark results({len(names)})=================\n" |
| 420 | + f"\n============ public device benchmark results({len(public_ones)})=================\n" |
| 421 | + ) |
| 422 | + for name in public_ones: |
| 423 | + logging.info(name) |
| 424 | + logging.info( |
| 425 | + f"\n======= private device benchmark results({len(private_ones)})=======\n" |
413 | 426 | ) |
414 | | - for name in names: |
| 427 | + for name in private_ones: |
415 | 428 | logging.info(name) |
416 | 429 |
|
417 | 430 | def _generate_table_name(self, group_info: dict, fields: list[str]) -> str: |
|
0 commit comments