Skip to content

Commit

Permalink
fix: output string on timbl queries to prevent crashing (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr authored Jun 23, 2024
1 parent 7b2586d commit 4897248
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions perf/bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ async function main() {
LoadedModule.FS.writeFile('data.n3', data);
LoadedModule.FS.writeFile('query.n3', query);

const timblRdfs = [...await getTimblAndFoaf(), ...await getRdfs()];
const timblFoafRdfs = [...await getTimblAndFoaf(), ...await getRdfs()];
const timblFoafOwl2rl = [...await getTimblAndFoaf(), ...await getOwl()];
const timblRdfs = [...await getTimbl(), ...await getRdfs()];
const timblOwl2rl = [...await getTimbl(), ...await getOwl()];

const LoadedDeep10 = await SwiplEye({ print: () => { } });
LoadedDeep10.FS.writeFile('data.n3', write(deepTaxonomyBenchmark10));
const LoadedDeep50 = await SwiplEye({ print: () => { } });
Expand Down Expand Up @@ -83,12 +85,18 @@ async function main() {
).add(
'Run deep taxonomy benchmark [100] [reasoning only]',
() => queryOnce(LoadedDeep100, 'main', ['--nope', '--quiet', './data.n3', '--pass-only-new']),
).add(
'Run timbl + foaf + rdfs rules',
deferred(() => n3reasoner(timblFoafRdfs, undefined, { outputType: 'string' })),
).add(
'Run timbl + foaf + owl2rl rules',
deferred(() => n3reasoner(timblFoafOwl2rl, undefined, { outputType: 'string' })),
).add(
'Run timbl + rdfs rules',
deferred(() => n3reasoner(timblRdfs)),
deferred(() => n3reasoner(timblRdfs, undefined, { outputType: 'string' })),
).add(
'Run timbl + owl2rl rules',
deferred(() => n3reasoner(timblOwl2rl)),
deferred(() => n3reasoner(timblOwl2rl, undefined, { outputType: 'string' })),
).on('cycle', (event: Event) => {
console.log(event.target.toString());
}).run();
Expand Down

0 comments on commit 4897248

Please sign in to comment.