Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Some simple benchmarking tools for the ReScript Compiler

License

NotificationsYou must be signed in to change notification settings

ryyppy/rescript-benchmark-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

This repository offers a simple setup for benchmarking your ReScript projectcompilation metrics.

How it works

It's very simple for now:

The scriptbenchmark-test.js will automatically pick up your bsconfig.sourcesconfiguration to find all.re file occurrences and puts it in relation tothe ReScript compiler build times by running a clean build.

It will not measure complete builds (no -clean-world | -make-world) to keepdependencies out of the equation.

Usage

node benchmark-test.js > result.json

The script outputs pure json onstdout, and some human readable informationonstderr. Example output:

node scripts/benchmark-test.jsCapturing LOC / file numbers...Cleaning the project first...Measuring build performance...{  "fileMetrics": {    "numberOfFiles": 37,    "blankLines": 483,    "commentLines": 177,    "codeLines": 4510,    "totalLines": 5170  },  "buildTime": {    "real": 3.12,    "user": 4.18,    "sys": 1.77  },  "results": {    "locPerSec": 1237  }}

Installation

It's a standalone NodeJS script, it only needs a typical ReScript project with absconfig.json in its project root andcloc as a dev dependency:

# Install line counting toolnpm install cloc --save-dev# Create some subdir if wantedmkdir scripts# Curl the test script into the scripts foldercurl -o scripts/benchmark-test.js https://raw.githubusercontent.com/ryyppy/re-compiler-benchmark-tool/master/benchmark-test.js# Make sure to make world before running the tool, otherwise it will failnpx bsb -make-world# To run itnode scripts/benchmark-test.js

Why not a package.json?

It's a simple script

About

Some simple benchmarking tools for the ReScript Compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp