« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xupd8.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js
index 4555b004..7396ac3b 100755
--- a/upd8.js
+++ b/upd8.js
@@ -1175,13 +1175,14 @@ const replacerSpec = {
 {
     function test(input) {
         let n = 0;
+        const s = 5;
         const start = Date.now();
-        const end = start + 1000;
+        const end = start + s * 1000;
         while (Date.now() < end) {
             transformInline.parse(input);
             n++;
         }
-        console.log(`Ran ${n} times.`);
+        console.log(`Ran ${Math.round(n / s)} times/sec.`);
     }
 
     test(fixWS`