https://github.com/vincenzopalazzo/vbenchmark
A V lang binding for google benchmark library
https://github.com/vincenzopalazzo/vbenchmark
vlang vlang-module
Last synced: 4 months ago
JSON representation
A V lang binding for google benchmark library
- Host: GitHub
- URL: https://github.com/vincenzopalazzo/vbenchmark
- Owner: vincenzopalazzo
- License: bsd-3-clause
- Created: 2022-02-22T13:59:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-05T14:01:36.000Z (over 4 years ago)
- Last Synced: 2025-02-02T16:33:34.137Z (over 1 year ago)
- Topics: vlang, vlang-module
- Language: V
- Homepage:
- Size: 1.49 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vbenchmark
A V lang binding for google benchmark library
## Table of Content
- Introduction
- How to use
- License
## Introduction
TODO
## How to use
To use vbenchmark you need to install google benchmark on your system with the following command
```bash
git clone git@github.com:google/benchmark.git
sudo cmake --build "build" --config Release --target install
```
after that you can run the example in the repository with the following commands
```bash
git clone https://github.com/vincenzopalazzo/vbenchmark.git
cd vbenchmark
v install --git https://github.com/vincenzopalazzo/vbenchmark.git
make && ./vbenchmark --benchmark_out=result.json --benchmark_out_format=json
```
You should see as result somethings like that
```bash
2022-03-23T22:12:42+01:00
Running ./vbenchmark
Run on (4 X 2910.84 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x2)
L1 Instruction 32 KiB (x2)
L2 Unified 256 KiB (x2)
L3 Unified 3072 KiB (x1)
Load Average: 0.96, 1.21, 1.27
-----------------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------------
Insert in BSTree 4030516 ns 4024936 ns 148
Assign variable 3.63 ns 3.62 ns 196105059
```
## License
TODO