comunica / sparqlee

⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator
https://www.npmjs.com/package/sparqlee
14 stars 7 forks source link

Adding simple addition benchmark #106

Closed jitsedesmet closed 3 years ago

jitsedesmet commented 3 years ago

This pull request adds a simple benchmark that tests a simple addition of integers. This feature was requested in #33 . Before the refactoring of #103 this test's output was: bench addition x 1,595 ops/sec ±2.99% (83 runs sampled). After refactoring we have bench addition x 1,582 ops/sec ±2.04% (82 runs sampled). This means there isn't really a big performance loss. A simple integer addition is probably one of the most expensive operations in the framework created in #102 so that's pretty good.

I use the benchmark lib that was already present and took most/ all of my inspiration from https://github.com/comunica/sparqlee/commit/760603210632a9c7ca2e1453611253f8ab1a0efa , provided to me by @wschella . For which I thank him.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1162085133


Files with Coverage Reduction New Missed Lines %
lib/expressions/Term.ts 1 96.43%
lib/util/Errors.ts 2 62.32%
lib/functions/Helpers.ts 4 93.48%
<!-- Total: 7 -->
Totals Coverage Status
Change from base Build 1138618512: -0.4%
Covered Lines: 1363
Relevant Lines: 1477

💛 - Coveralls
jitsedesmet commented 3 years ago

I think we should be able to merge this now.