From 6878523186b32cdd74d5600b086ae96866d8c8c5 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Mon, 25 Apr 2022 18:27:04 +0200 Subject: [PATCH] cancel performance hook --- .../Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res index e107016f..47c39140 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res @@ -54,11 +54,13 @@ let callInternal = (call: functionCall): result<'b, errorValue> => { } let inspectPerformance = (value: expressionValue, label: string) => { - let _ = %raw("{performance} = require('perf_hooks')") - let start = %raw(`performance.now()`) - let finish = %raw(`performance.now()`) - let performance = finish - start - Js.log(`${label}: ${value->toString} performance: ${Js.String.make(performance)}ms`) + // let _ = %raw("{performance} = require('perf_hooks')") + // let start = %raw(`performance.now()`) + // let finish = %raw(`performance.now()`) + // let performance = finish - start + // Js.log(`${label}: ${value->toString} performance: ${Js.String.make(performance)}ms`) + // TODO find a way of failing the hook gracefully, also needs a block parameter + Js.log(`${label}: ${value->toString}`) value->Ok }