Measure translation speed
This commit is contained in:
parent
46ebc2bc5c
commit
57ba6411c2
2 changed files with 4 additions and 1 deletions
|
@ -250,6 +250,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||
|
||||
let mut log = ::std::fs::File::create("../target/log.txt").unwrap();
|
||||
|
||||
let before = ::std::time::Instant::now();
|
||||
for mono_item in
|
||||
collector::collect_crate_mono_items(tcx, collector::MonoItemCollectionMode::Eager).0
|
||||
{
|
||||
|
@ -268,6 +269,8 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||
}
|
||||
}
|
||||
}
|
||||
let after = ::std::time::Instant::now();
|
||||
println!("time: {:?}", after - before);
|
||||
|
||||
std::mem::replace(&mut cx.defined_functions, Vec::new())
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue