-module(gleamy_bench_example). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([main/0]). -file("/home/julian/projects/gleamy_bench/src/gleamy_bench_example.gleam", 6). -spec sort_int(list(integer())) -> list(integer()). sort_int(Data) -> gleam@list:sort(Data, fun gleam@int:compare/2). -file("/home/julian/projects/gleamy_bench/src/gleamy_bench_example.gleam", 10). -spec main() -> nil. main() -> _pipe = gleamy@bench:run( [{input, <<"pre-sorted list"/utf8>>, gleam@list:range(1, 100000)}, {input, <<"reversed list"/utf8>>, gleam@list:reverse(gleam@list:range(1, 100000))}], [{function, <<"list.sort()"/utf8>>, fun sort_int/1}], [{duration, 1000}, {warmup, 100}] ), _pipe@1 = gleamy@bench:table(_pipe, [ips, min, {p, 99}]), gleam@io:println(_pipe@1).