1{
2 buildDunePackage,
3 fetchFromGitHub,
4 lib,
5 printbox-text,
6 reason,
7}:
8
9buildDunePackage {
10 pname = "reperf";
11 version = "1.5.1";
12
13 src = fetchFromGitHub {
14 owner = "bryphe";
15 repo = "reperf";
16 rev = "68ef2f96899c09e6ac7d929b0375f7a806aee067";
17 sha256 = "sha256-ASujTsH4eDAYLNalB9Xt1p3C8x+FI0kMldZBYaXMCWc=";
18 };
19
20 postPatch = ''
21 substituteInPlace src/dune --replace "printbox" "printbox-text"
22 '';
23
24 nativeBuildInputs = [ reason ];
25
26 propagatedBuildInputs = [
27 printbox-text
28 ];
29
30 meta = with lib; {
31 description = "Native Reason + JSOO cross-platform performance benchmarking tools";
32 longDescription = ''
33 Inspired by the core_bench tools from Janestreet.
34
35 reperf helps with:
36 * Timing: time spent in a code block
37 * Call count: frequency of code-path calls
38 * Allocations: code-block impact to garbage collector
39
40 Supports benchmarks, which are test cases that exercise performance scenarios.
41 Outputs a JSON performance report, and compare it with previous iterations - and fail if a regression is detected.
42 '';
43 homepage = "https://github.com/bryphe/reperf";
44 maintainers = [ ];
45 license = licenses.mit;
46 };
47}