Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mitata

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mitata - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

src/mitata.hpp

2

package.json

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "1.0.8",
"version": "1.0.9",
"main": "src/main.mjs",

@@ -8,0 +8,0 @@ "types": "src/main.d.mts",

@@ -25,11 +25,19 @@ <h1 align=center>mitata</h1>

<table>
<tr>
<th>javascript</th>
<th>c++ single header</th>
</tr>
<tr>
<td>
```js
import { run, bench, boxplot } from 'mitata';
function fibonacciRecursive(n) {
function fibonacci(n) {
if (n <= 1) return n;
return fibonacciRecursive(n - 1) + fibonacciRecursive(n - 2);
return fibonacci(n - 1) + fibonacci(n - 2);
}
bench('fibonacci(40)', () => fibonacciRecursive(40));
bench('fibonacci(40)', () => fibonacci(40));

@@ -45,3 +53,34 @@ boxplot(() => {

```
</td>
<td>
```cpp
#include "src/mitata.hpp"
int fibonacci(int n) {
if (n <= 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
int main() {
mitata::runner runner;
runner.bench("noop", []() { });
runner.summary([&]() {
runner.bench("empty fn", []() { });
runner.bench("fibonacci", []() { fibonacci(20); });
});
auto stats = runner.run();
}
```
</td>
</tr>
</table>
## configure your experience

@@ -55,2 +94,5 @@

await run({ throw: true }); // will immediately throw instead of handling error quietly
// c++
auto stats = runner.run({ .colors = true, .format = "mitata", .filter = std::regex(".*") });
```

@@ -176,2 +218,10 @@

```cpp
#include "src/mitata.hpp"
int main() {
auto stats = mitata::lib::fn([]() { /***/ })
}
```
```js

@@ -178,0 +228,0 @@ import { B, measure } from 'mitata';

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc