Add benchmarking API via benchmark.js.