https://github.com/specs-feup/clava-lite-benchmarks
A collection of applications and benchmark suites used to evaluate several Clava NPM packages
https://github.com/specs-feup/clava-lite-benchmarks
benchmarks c cpp source-to-source
Last synced: 2 months ago
JSON representation
A collection of applications and benchmark suites used to evaluate several Clava NPM packages
- Host: GitHub
- URL: https://github.com/specs-feup/clava-lite-benchmarks
- Owner: specs-feup
- License: lgpl-3.0
- Created: 2024-12-04T01:39:58.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-11-15T03:21:06.000Z (8 months ago)
- Last Synced: 2025-11-15T05:41:20.459Z (8 months ago)
- Topics: benchmarks, c, cpp, source-to-source
- Language: C
- Homepage:
- Size: 77.3 MB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clava-lite-benchmarks
A simple, reusable benchmark loader for NPM-based Clava packages.
## Usage
* Example 1: Loading an entire suite, one application at a time:
```TypeScript
import Query from "@specs-feup/lara/api/weaver/Query.js";
import { FunctionJp } from "@specs-feup/clava/api/Joinpoints.js";
import { loadSuite } from "@specs-feup/clava-lite-benchmarks/LiteBenchmarkLoader";
import { ROSETTA } from "@specs-feup/clava-lite-benchmarks/BenchmarkSuites";
const loader = loadSuite(ROSETTA);
for (const res of loader) {
if (res.success) {
console.log(`Loaded app: ${res.app}, top function: ${res.topFunction}`);
// Run whatever script you want over the loaded application
// For this example, we simply print the name of every function
for (const fun of Query.search(FunctionJp)) {
console.log(fun.name);
}
}
else {
console.log(`Failed to load app: ${res.app}`);
}
}
```
* Example 2: loading a specific application, provided we know its name
```TypeScript
import Query from "@specs-feup/lara/api/weaver/Query.js";
import { FunctionJp } from "@specs-feup/clava/api/Joinpoints.js";
import { loadApp } from "@specs-feup/clava-lite-benchmarks/LiteBenchmarkLoader";
import { ROSETTA } from "@specs-feup/clava-lite-benchmarks/BenchmarkSuites";
let suite = ROSETTA;
let app = "spam-filter"
loadApp(suite, app);
for (const fun of Query.search(FunctionJp)) {
console.log(fun.name);
}
```
## Licenses
This Clava extension is licensed under LGPL-3.0 License. You can use, modify, and distribute it under the terms of this license.
The included benchmark applications have different licenses, which are provided alongside their code.