MCPcopy Create free account
hub / github.com/alibaba/GraphScope / estimate

Function estimate

python/graphscope/gsctl/commands/common.py:180–196  ·  view source on GitHub ↗

Estimate the resources requirement for various kinds of GraphScope components

(engine, v_num, e_num, v_file_size, e_file_size, partition)

Source from the content-addressed store, hash-verified

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)
180def 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
199if __name__ == "__main__":

Callers

nothing calls this directly

Calls 5

errFunction · 0.90
infoFunction · 0.90
succFunction · 0.90

Tested by

no test coverage detected