Skip to content

Commit 63e6ea4

Browse files
committed
Fix lint warnings in benchmarks and serve script
1 parent 0142566 commit 63e6ea4

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

benchmarks/snapshot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function runBenchmark(count) {
4040
const snapshotJson = JSON.stringify(snapshot);
4141
const t3 = performance.now();
4242

43-
const engineFromSnapshot = itemsjs(data, {
43+
itemsjs(data, {
4444
...config,
4545
fulltextSnapshot: snapshot.fulltext,
4646
facetsSnapshot: snapshot.facets,

scripts/serve-benchmark.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,8 @@ const server = http.createServer((req, res) => {
5151
});
5252

5353
server.listen(port, () => {
54-
const indexPath = path.join(
55-
root,
56-
'benchmarks',
57-
'browser-snapshot.html'
58-
);
59-
const fileUrl = pathToFileURL(indexPath).href;
54+
const indexPath = path.join(root, 'benchmarks', 'browser-snapshot.html');
6055
console.log(`Static server running on http://localhost:${port}`);
6156
console.log(`Open http://localhost:${port}/benchmarks/browser-snapshot.html`);
6257
console.log(`(or file://${indexPath})`);
6358
});
64-
65-
function pathToFileURL(p) {
66-
const url = new URL('file://');
67-
url.pathname = path
68-
.resolve(p)
69-
.split(path.sep)
70-
.map(encodeURIComponent)
71-
.join('/');
72-
return url;
73-
}

0 commit comments

Comments
 (0)