From 20db8591aabbc0244b1f54c9226fd61cbc42a9b1 Mon Sep 17 00:00:00 2001 From: Pitchaya Boonsarngsuk <2285135b@student.gla.ac.uk> Date: Mon, 5 Feb 2018 20:06:12 +0000 Subject: [PATCH] Add console logs --- src/hybridSimulation.js | 3 +++ src/neighbourSampling.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/hybridSimulation.js b/src/hybridSimulation.js index 6131b8d..5dbcd85 100644 --- a/src/hybridSimulation.js +++ b/src/hybridSimulation.js @@ -113,11 +113,14 @@ export default function (sim, forceS, forceF) { } event.call("startInterp"); + let p1 = performance.now(); if (NUM_PIVOTS>=1) { interpolationPivots(sample, remainder, NUM_PIVOTS, interpDistanceFn, INTERP_FINE_ITS); } else { interpBruteForce(sample, remainder, interpDistanceFn, INTERP_FINE_ITS); } + let p2 = performance.now(); + console.log("Interpolation time: " + (p2 - p1)); event.call("fullTick"); alreadyRanIterations = 0; diff --git a/src/neighbourSampling.js b/src/neighbourSampling.js index a2255c3..e01d4d2 100644 --- a/src/neighbourSampling.js +++ b/src/neighbourSampling.js @@ -66,6 +66,7 @@ export default function () { if(stableVeloHandler!==null && velocityDiff