{"id":16663866,"url":"https://github.com/sgraf812/cloben","last_synced_at":"2025-07-14T09:41:11.852Z","repository":{"id":59151725,"uuid":"49164111","full_name":"sgraf812/cloben","owner":"sgraf812","description":"Clone and benchmark Haskell git repositories for gipeda","archived":false,"fork":false,"pushed_at":"2018-11-02T09:29:31.000Z","size":40,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-23T19:06:05.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgraf812.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-06T21:54:28.000Z","updated_at":"2018-11-02T09:29:33.000Z","dependencies_parsed_at":"2022-09-15T14:11:49.215Z","dependency_job_id":null,"html_url":"https://github.com/sgraf812/cloben","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgraf812/cloben","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgraf812%2Fcloben","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgraf812%2Fcloben/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgraf812%2Fcloben/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgraf812%2Fcloben/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgraf812","download_url":"https://codeload.github.com/sgraf812/cloben/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgraf812%2Fcloben/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265271635,"owners_count":23738291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T10:42:21.681Z","updated_at":"2025-07-14T09:41:11.819Z","avatar_url":"https://github.com/sgraf812.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `cloben` [![Build Status](https://travis-ci.org/sgraf812/cloben.svg?branch=master)](https://travis-ci.org/sgraf812/cloben) [![Hackage](https://img.shields.io/hackage/v/cloben.svg?flat=true)](https://hackage.haskell.org/package/cloben)\n\n`cloben` is a Haskell shell script transforms `cabal bench`/`stack bench` results into a CSV file readable by `gipeda` for visualization.\nPrior to that, it optionally clones a specific commit of a given git repository into a temporary folder in which it then performs the benchmarking.\n\nIt parses build warnings and timing data output in the standard `criterion` format.\n\n# Usage\n\nThere are two modes of operation:\n\n`cloben` will benchmark the cabal project in the current working directory and output the CSV data on `stdout`. It will try to use `stack` as an optimization, but the fall back mechanism (cabal sandboxing) takes 10 minutes on my laptop for even the simplest dependency tree, so stay calm :).\n\n`cloben \u003crepo\u003e \u003ccommit\u003e` will also attempt to recursively clone a remote git `repo` at a specific `commit` into a temporary directory and `cd` into it prior to benchmarking.\n\nFor usage with `gipeda`, `stdout` should be redirected into a csv file.\n\nSee also `cloben --help`.\n\n# How to build\n\nSimplest way? Don't! Use [`stack`s excellent support for `runghc`](http://docs.haskellstack.org/en/stable/GUIDE.html#script-interpreter):\n```\n$ stack cloben.hs\n```\nOr on unixoid systems:\n```\n$ chmod +x cloben.hs\n$ ./cloben.hs\n```\n\nOf course, `cloben` can be built both in a `cabal` and in a `stack` environment.\n```\n$ stack build \u0026\u0026 stack exec cloben\n...\n$ cabal install -j \u0026\u0026 cabal run\n...\n```\n\nOr even just through hackage:\n\n```\n$ stack install cloben \u0026\u0026 cloben\n...\n$ cabal install cloben \u0026\u0026 cloben\n...\n```\n\n# Example\n\nWhat running `cloben` on the `Pipes` library yielded:\n\n```\n$ ./cloben.hs https://github.com/Gabriel439/Haskell-Pipes-Library 930c834aacfa7bf8ec65d072e0d0a982aa7a2bc1 \u003e logs/930c834aacfa7bf8ec65d072e0d0a982aa7a2bc1.csv\n$ cat logs/930c834aacfa7bf8ec65d072e0d0a982aa7a2bc1.csv\nbuild/warnings;81.0\nbenchmark/prelude-benchmarks/Folds/all;152900.0\nbenchmark/prelude-benchmarks/Folds/any;163700.0\nbenchmark/prelude-benchmarks/Folds/find;170800.0\nbenchmark/prelude-benchmarks/Folds/findIndex;164500.0\nbenchmark/prelude-benchmarks/Folds/fold;68150.0\nbenchmark/prelude-benchmarks/Folds/foldM;67690.0\nbenchmark/prelude-benchmarks/Folds/head;10.84\nbenchmark/prelude-benchmarks/Folds/index;117000.0\nbenchmark/prelude-benchmarks/Folds/last;119600.0\nbenchmark/prelude-benchmarks/Folds/length;53960.0\nbenchmark/prelude-benchmarks/Folds/null;11.2\nbenchmark/prelude-benchmarks/Folds/toList;138100.0\nbenchmark/prelude-benchmarks/Pipes/chain;1351000.0\nbenchmark/prelude-benchmarks/Pipes/drop;110400.0\nbenchmark/prelude-benchmarks/Pipes/dropWhile;159000.0\nbenchmark/prelude-benchmarks/Pipes/filter;585100.0\nbenchmark/prelude-benchmarks/Pipes/findIndices;397900.0\nbenchmark/prelude-benchmarks/Pipes/map;324600.0\nbenchmark/prelude-benchmarks/Pipes/mapM;1276000.0\nbenchmark/prelude-benchmarks/Pipes/take;346500.0\nbenchmark/prelude-benchmarks/Pipes/takeWhile;332400.0\nbenchmark/prelude-benchmarks/Pipes/scan;370900.0\nbenchmark/prelude-benchmarks/Pipes/scanM;1177000.0\nbenchmark/prelude-benchmarks/Pipes/concat;159600.0\nbenchmark/prelude-benchmarks/Zips/zip;1218000.0\nbenchmark/prelude-benchmarks/Zips/zipWith;1318000.0\nbenchmark/prelude-benchmarks/enumFromTo.vs.each/enumFromTo;205700.0\nbenchmark/prelude-benchmarks/enumFromTo.vs.each/each;209000.0\nbenchmark/lift-benchmarks/ReaderT/runReaderP_B;4791000.0\nbenchmark/lift-benchmarks/ReaderT/runReaderP_A;266600.0\nbenchmark/lift-benchmarks/StateT/runStateP_B;4912000.0\nbenchmark/lift-benchmarks/StateT/runStateP_A;344800.0\nbenchmark/lift-benchmarks/StateT/evalStateP_B;5534000.0\nbenchmark/lift-benchmarks/StateT/evalStateP_A;349400.0\nbenchmark/lift-benchmarks/StateT/execStateP_B;5451000.0\nbenchmark/lift-benchmarks/StateT/execStateP_A;324300.0\n```\n\n# Which `cabal`, `stack` and `ghc` binaries are used?\n\nShort answer: That found on the path at the time of executing this script.\n\nIf `cloben` is compiled to an executable which is then called from your shell,\nit will use `cabal`, `stack` and `ghc` binaries found on your path.\n\nIf however you prefer to run this as a script through `stack` (see above),\nnote that `stack` modifies the environment, so it will use a 'stack-local' version\nof `cabal` when `stack install cabal-install` happened.\n\nFinally, note that the fallback mechanism (try `stack bench`, fall back to `cabal sandbox init \u0026\u0026 cabal bench`)\nmight fail if it can't find `ghc` on the path.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgraf812%2Fcloben","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgraf812%2Fcloben","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgraf812%2Fcloben/lists"}