MCPcopy Index your code
hub / github.com/RustPython/RustPython / benchmark_file_execution

Function benchmark_file_execution

benches/execution.rs:41–48  ·  view source on GitHub ↗
(group: &mut BenchmarkGroup<WallTime>, name: &str, contents: &str)

Source from the content-addressed store, hash-verified

39}
40
41pub fn benchmark_file_execution(group: &mut BenchmarkGroup<WallTime>, name: &str, contents: &str) {
42 group.bench_function(BenchmarkId::new(name, "cpython"), |b| {
43 bench_cpython_code(b, contents)
44 });
45 group.bench_function(BenchmarkId::new(name, "rustpython"), |b| {
46 bench_rustpython_code(b, name, contents)
47 });
48}
49
50pub fn benchmark_file_parsing(group: &mut BenchmarkGroup<WallTime>, name: &str, contents: &str) {
51 group.throughput(Throughput::Bytes(contents.len() as u64));

Callers 1

criterion_benchmarkFunction · 0.85

Calls 3

newFunction · 0.85
bench_cpython_codeFunction · 0.70
bench_rustpython_codeFunction · 0.70

Tested by

no test coverage detected