Skip to content

Commit

Permalink
Fix perf script
Browse files Browse the repository at this point in the history
  • Loading branch information
valadaptive committed Sep 13, 2024
1 parent 18edff1 commit 4d2818c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/scripts/perf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

let avro = require('../../lib'),
Benchmark = require('benchmark'),
path = require('path');
path = require('path'),
fs = require('fs');


let paths = process.argv.slice(2);
Expand All @@ -38,7 +39,8 @@ console.log(['fromBuffer', 'toBuffer', 'isValid ', '(ops/sec)'].join('\t| '));
console.log(['---------:', '-------:', '------: ', '---------'].join('\t| '));

paths.forEach((fpath) => {
let type = avro.parse(fpath, {wrapUnions: wrap});
let schema = JSON.parse(fs.readFileSync(fpath, 'utf-8'));
let type = avro.Type.forSchema(schema, {wrapUnions: wrap});
let values = [];
let bufs = [];

Expand Down

0 comments on commit 4d2818c

Please sign in to comment.