MCPcopy Create free account
hub / github.com/avoidwork/tenso / benchmarkJsonlParser

Function benchmarkJsonlParser

benchmarks/parsers.js:104–128  ·  view source on GitHub ↗

* Benchmarks JSONL parser performance

()

Source from the content-addressed store, hash-verified

102 * Benchmarks JSONL parser performance
103 */
104function benchmarkJsonlParser () {
105 console.log("\n📊 JSONL Parser Benchmarks");
106 console.log("-".repeat(40));
107
108 const suite = new Benchmark.Suite();
109 const jsonlParser = parsers.get("application/jsonl");
110
111 suite
112 .add("JSONL Parser - Small (1 line)", () => {
113 jsonlParser(testData.jsonl.small);
114 })
115 .add("JSONL Parser - Medium (100 lines)", () => {
116 jsonlParser(testData.jsonl.medium);
117 })
118 .add("JSONL Parser - Large (1000 lines)", () => {
119 jsonlParser(testData.jsonl.large);
120 })
121 .on("cycle", event => {
122 console.log(` ${String(event.target)}`);
123 })
124 .on("complete", function () {
125 console.log(` Fastest: ${this.filter("fastest").map("name")}`);
126 })
127 .run();
128}
129
130/**
131 * Benchmarks form URL encoded parser performance

Callers 1

mainFunction · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected