MCPcopy Create free account
hub / github.com/apache/datafusion / main

Function main

benchmarks/compile_profile.py:175–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173
174
175def main() -> None:
176 args = parse_args()
177 data_path = args.data.resolve()
178 if not data_path.exists():
179 print(f"Data directory not found: {data_path}", file=sys.stderr)
180 sys.exit(1)
181
182 results: list[ProfileResult] = []
183 for profile in args.profiles:
184 print(f"\n=== Profile: {profile} ===")
185 print("Cleaning previous build artifacts...")
186 cargo_clean(profile)
187 compile_seconds = cargo_build(profile)
188 run_seconds = run_benchmark(profile, data_path)
189 size_bytes = binary_size(profile)
190 results.append(ProfileResult(profile, compile_seconds, run_seconds, size_bytes))
191
192 print("\nSummary")
193 header = f"{'Profile':<15}{'Compile':>12}{'Run':>12}{'Size':>12}"
194 print(header)
195 print("-" * len(header))
196 for result in results:
197 print(
198 f"{result.profile:<15}{human_time(result.compile_seconds):>12}"
199 f"{human_time(result.run_seconds):>12}{human_size(result.binary_bytes):>12}"
200 )
201
202if __name__ == "__main__":
203 main()

Callers 1

compile_profile.pyFile · 0.70

Calls 11

parse_argsFunction · 0.85
cargo_cleanFunction · 0.85
cargo_buildFunction · 0.85
binary_sizeFunction · 0.85
ProfileResultClass · 0.85
human_timeFunction · 0.85
human_sizeFunction · 0.85
existsMethod · 0.80
run_benchmarkFunction · 0.70
resolveMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…