From 62c7b2eca9d9a53ccedd6517c955285b0732d255 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 23 Apr 2019 05:46:46 -0700 Subject: [PATCH] benchmark: fix http bench-parser.js The internal HTTParser `reinitialize()` function was removed in ece507394a and replaced with an `initialize()` function. This broke benchmark/http/bench-parser.js. This change updates the benchmark so that it runs again. PR-URL: https://github.com/nodejs/node/pull/27359 Reviewed-By: Refael Ackermann Reviewed-By: Benjamin Gruenbaum --- benchmark/http/bench-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/http/bench-parser.js b/benchmark/http/bench-parser.js index a54f0efa75e3c1..271ac55d007028 100644 --- a/benchmark/http/bench-parser.js +++ b/benchmark/http/bench-parser.js @@ -24,7 +24,7 @@ function main({ len, n }) { bench.start(); for (var i = 0; i < n; i++) { parser.execute(header, 0, header.length); - parser.reinitialize(REQUEST, i > 0); + parser.initialize(REQUEST, header); } bench.end(n); }