most-inesctec / kruonis Goto Github PK
View Code? Open in Web Editor NEW:hourglass: A tool to perform benchmarks, on TypeScript :hourglass:
Home Page: https://www.npmjs.com/package/kruonis
License: MIT License
:hourglass: A tool to perform benchmarks, on TypeScript :hourglass:
Home Page: https://www.npmjs.com/package/kruonis
License: MIT License
Hi. I was finding a benchmark tool other than benchmark.js and found yours. However, I got this error:
Could not find a declaration file for module 'kruonis'. .../node_modules/kruonis/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/kruonis` if it exists or add a new declaration (.d.ts) file containing `declare module 'kruonis';`ts(7016)
When I check the package on node_modules, I see that you included all the files including the source code on the bundle. Which is not necessary because it won't be used by the users anyway.
Do you mind if I submit a PR to fix that + create a typescript definition build + CJS and ESM support?
I was trying to use kruonis in a browser to run some benchmarks, however I get this error:
Uncaught SyntaxError: import not found: default
at the beginning of index.mjs:
import now from 'performance-now';
Im a bit new to npm and different module systems, but from looking at performance-now, it looks like its cjs only. They only have module.exports, no esm export. Maybe that's the problem here?
benchmark
.add(
new Test('Sleep', async() => {
await sleep(10000)
}))
const results: Array<[string, Stats]> = await benchmark.run();
for (let result of results) {
console.log("Test name: " + result[0])
console.log("Test stats: ")
console.log(result[1])
}
This code prints the results before the sleep promise was resolved. How to use benchmark with async calls?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.