@@ -2603,7 +2603,14 @@ def replica_size_for_scale(self, scale: int) -> str:
26032603 """
26042604 Returns the replica size for a given scale.
26052605 """
2606- return f"{ scale } 00cc"
2606+ return {
2607+ 1 : "M.1-xsmall" ,
2608+ 2 : "M.1-small" ,
2609+ 4 : "M.1-large" ,
2610+ 8 : "M.1-2xlarge" ,
2611+ 16 : "M.1-4xlarge" ,
2612+ 32 : "M.1-8xlarge" ,
2613+ }[scale ]
26072614
26082615
26092616class DockerTarget (BenchTarget ):
@@ -2638,7 +2645,7 @@ def cleanup(self) -> None:
26382645 self .composition .stop ("materialized" )
26392646
26402647 def replica_size_for_scale (self , scale : int ) -> str :
2641- # 100cc == 2 workers
2648+ # M.1-xsmall == 2 workers
26422649 return f"scale=1,workers={ 2 * scale } "
26432650
26442651 def max_scale (self ) -> int | None :
@@ -2910,19 +2917,14 @@ def analyze_cluster_results_file(file: str) -> None:
29102917 print (f"--- Analyzing cluster results file { file } ..." )
29112918
29122919 def extract_cluster_size (s : str ) -> float :
2913- match = re .search (r"(\d+)(?:(cc)|(C))" , s )
2914- if match :
2915- if match .group (2 ): # 'cc' match
2916- return float (match .group (1 )) / 100.0
2917- elif match .group (3 ): # 'C' matches
2918- return float (match .group (1 ))
2919- match = re .search (r"(?:scale=)(\d+)(?:,workers=)(\d+)" , s )
2920- if match :
2921- # We don't have credits in docker, so approximate it
2922- # 100cc == 2 workers
2923- if match .group (1 ) and match .group (2 ):
2924- return float (match .group (1 )) * float (match .group (2 )) / 2
2925- raise ValueError (f"Invalid cluster size format: { s } " )
2920+ return {
2921+ "M.1-xsmall" : 1 ,
2922+ "M.1-small" : 2 ,
2923+ "M.1-large" : 4 ,
2924+ "M.1-2xlarge" : 8 ,
2925+ "M.1-4xlarge" : 16 ,
2926+ "M.1-8xlarge" : 32 ,
2927+ }[s ]
29262928
29272929 df = pd .read_csv (file )
29282930 if df .empty :
0 commit comments