5538: Report type errors in metrics r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-26 10:44:33 +00:00 committed by GitHub
commit 8ff40af728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,12 +276,16 @@ pub fn analysis_stats(
num_exprs_unknown, num_exprs_unknown,
if num_exprs > 0 { num_exprs_unknown * 100 / num_exprs } else { 100 } if num_exprs > 0 { num_exprs_unknown * 100 / num_exprs } else { 100 }
); );
report_metric("unknown type", num_exprs_unknown, "#");
eprintln!( eprintln!(
"Expressions of partially unknown type: {} ({}%)", "Expressions of partially unknown type: {} ({}%)",
num_exprs_partially_unknown, num_exprs_partially_unknown,
if num_exprs > 0 { num_exprs_partially_unknown * 100 / num_exprs } else { 100 } if num_exprs > 0 { num_exprs_partially_unknown * 100 / num_exprs } else { 100 }
); );
eprintln!("Type mismatches: {}", num_type_mismatches); eprintln!("Type mismatches: {}", num_type_mismatches);
report_metric("type mismatches", num_type_mismatches, "#");
let inference_time = inference_time.elapsed(); let inference_time = inference_time.elapsed();
let total_memory = ra_prof::memory_usage(); let total_memory = ra_prof::memory_usage();