You should not parse the stdout produced from console functions. It is for producing human-readable information. If you want machine-consumable data, you should use something like benchmark.js.
Classic HN comment on this topic: https://news.ycombinator.com/item?id=6530180