Estimate the resources requirement for various kinds of GraphScope components
(engine, v_num, e_num, v_file_size, e_file_size, partition)
| 178 | @click.option("-ef", "--e-file-size", type=float, help="Size of edge files in GB") |
| 179 | @click.option("-p", "--partition", type=int, help="Number of partitions", default=1) |
| 180 | def estimate(engine, v_num, e_num, v_file_size, e_file_size, partition): |
| 181 | """Estimate the resources requirement for various kinds of GraphScope components""" |
| 182 | if engine == "gae": |
| 183 | if v_num is None or e_num is None or v_file_size is None or e_file_size is None: |
| 184 | err("Please provide the required parameters.") |
| 185 | return |
| 186 | partition_usage = estimate_gae_memory_usage_for_graph( |
| 187 | v_num, e_num, v_file_size, e_file_size, partition |
| 188 | ) |
| 189 | algorithm_usage = estimate_gae_memory_usage_for_algorithm(v_num) |
| 190 | memory_usage = partition_usage + algorithm_usage |
| 191 | info(disclaimer) |
| 192 | succ( |
| 193 | f"The estimated memory usage is {memory_usage:.2f} GB per pod for {partition} pods.\n" |
| 194 | ) |
| 195 | else: |
| 196 | err(f"Estimating usage of engine {engine} is not supported yet.") |
| 197 | |
| 198 | |
| 199 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected