diff --git a/src/js/workers/hex_parser.js b/src/js/workers/hex_parser.js index 0f946260..19bb501b 100644 --- a/src/js/workers/hex_parser.js +++ b/src/js/workers/hex_parser.js @@ -93,13 +93,14 @@ function read_hex_file(data) { } } +const TIME_LABEL = 'HEX_PARSER - File parsed in'; + onmessage = function(event) { - const timeParsingStart = microtime(); // track time + console.time(TIME_LABEL) read_hex_file(event.data); - console.log(`HEX_PARSER - File parsed in: ${(microtime() - timeParsingStart).toFixed(4)} seconds`); - // terminate worker + console.timeEnd(TIME_LABEL); close(); };