Skip to content

fix(benchmark): add reports dir judge and remove plsql and include pgsql #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed benchmark/data/plsql/create.sql
Empty file.
2 changes: 0 additions & 2 deletions benchmark/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const testFiles: TestFile[] = [
sqlFileName: 'select.sql',
loopTimes: 3,
testTypes: ['validate', 'getAllTokens'],
excludes: ['plsql', 'postgresql'],
},
{
name: 'Select All Entities',
Expand All @@ -45,7 +44,6 @@ const testFiles: TestFile[] = [
sqlFileName: 'create.sql',
loopTimes: 3,
testTypes: ['validate', 'getAllTokens'],
excludes: ['plsql', 'postgresql'],
},
];

Expand Down
5 changes: 5 additions & 0 deletions benchmark/sqlBenchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ class SqlBenchmark {
);
const currentVersion = require('../package.json').version;
const parsedEnvInfo = JSON.parse(envInfo);

if (!fs.existsSync(path.join(__dirname, `./reports`))) {
fs.mkdirSync(path.join(__dirname, `./reports`), { recursive: true });
}

const writePath = path.join(__dirname, `./reports/${this.language}.benchmark.md`);
const writter = new MarkdownWritter(writePath);
writter.writeHeader('Benchmark', 2);
Expand Down
Loading