Skip to content

Commit 5d97aea

Browse files
authored
Merge pull request #314 from LuckyFBB/fix/benchmark_file
fix(benchmark): add reports dir judge and remove plsql and include pgsql
2 parents de1bd9d + 9c534c2 commit 5d97aea

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

benchmark/data/plsql/create.sql

Whitespace-only changes.

benchmark/run.ts

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const testFiles: TestFile[] = [
3131
sqlFileName: 'select.sql',
3232
loopTimes: 3,
3333
testTypes: ['validate', 'getAllTokens'],
34-
excludes: ['plsql', 'postgresql'],
3534
},
3635
{
3736
name: 'Select All Entities',
@@ -45,7 +44,6 @@ const testFiles: TestFile[] = [
4544
sqlFileName: 'create.sql',
4645
loopTimes: 3,
4746
testTypes: ['validate', 'getAllTokens'],
48-
excludes: ['plsql', 'postgresql'],
4947
},
5048
];
5149

benchmark/sqlBenchmark.ts

+5
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ class SqlBenchmark {
208208
);
209209
const currentVersion = require('../package.json').version;
210210
const parsedEnvInfo = JSON.parse(envInfo);
211+
212+
if (!fs.existsSync(path.join(__dirname, `./reports`))) {
213+
fs.mkdirSync(path.join(__dirname, `./reports`), { recursive: true });
214+
}
215+
211216
const writePath = path.join(__dirname, `./reports/${this.language}.benchmark.md`);
212217
const writter = new MarkdownWritter(writePath);
213218
writter.writeHeader('Benchmark', 2);

0 commit comments

Comments
 (0)