Procházet zdrojové kódy

test-harness: change wasm benchmark to use microsecs instead of millisecs

zero před 2 roky
rodič
revize
99d5e54883
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      src/contract/test-harness/src/lib.rs

+ 3 - 3
src/contract/test-harness/src/lib.rs

@@ -303,15 +303,15 @@ fn benchmark_wasm_calls(
         let mut times = [0; 3];
         let now = std::time::Instant::now();
         let _metadata = runtime.metadata(&payload).expect("metadata");
-        times[0] = now.elapsed().as_millis();
+        times[0] = now.elapsed().as_micros();
 
         let now = std::time::Instant::now();
         let update = runtime.exec(&payload).expect("exec");
-        times[1] = now.elapsed().as_millis();
+        times[1] = now.elapsed().as_micros();
 
         let now = std::time::Instant::now();
         runtime.apply(&update).expect("update");
-        times[2] = now.elapsed().as_millis();
+        times[2] = now.elapsed().as_micros();
 
         writeln!(
             file,