{"id":15010271,"url":"https://github.com/clojure/test.benchmark","last_synced_at":"2025-10-19T22:30:39.015Z","repository":{"id":1143968,"uuid":"1025188","full_name":"clojure/test.benchmark","owner":"clojure","description":"Benchmark and Regression Suite for Clojure","archived":false,"fork":false,"pushed_at":"2024-07-15T18:02:15.000Z","size":188,"stargazers_count":37,"open_issues_count":0,"forks_count":10,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-01-30T06:51:16.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clojure.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-10-26T11:08:09.000Z","updated_at":"2024-02-20T19:40:44.000Z","dependencies_parsed_at":"2024-10-07T11:50:26.379Z","dependency_job_id":"10b156bb-bd3c-4d14-b850-426143de6e91","html_url":"https://github.com/clojure/test.benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojure","download_url":"https://codeload.github.com/clojure/test.benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237221172,"owners_count":19274447,"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-09-24T19:33:16.862Z","updated_at":"2025-10-19T22:30:33.719Z","avatar_url":"https://github.com/clojure.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"Benchmark (and regression) suite for Clojure Copyright (c) Rich Hickey.\n\nLicense and CA same as Clojure. See epl-v10.html at the root of the project for details.\n## Getting Started\n### Requirements\n* JDK with java/javac on path - http://www.oracle.com/technetwork/java/javase/downloads/index.html\n* maven - http://maven.apache.org/guides/getting-started/index.html\n\n### Add the following to your ~/.m2/settings.xml file\n    \u003csettings\u003e\n    \t\u003cactiveProfiles\u003e\n            \u003cactiveProfile\u003eclojure-dev\u003c/activeProfile\u003e\n    \t\u003c/activeProfiles\u003e\n    \n    \t\u003cprofiles\u003e\n            \u003cprofile\u003e\n                \u003cid\u003eclojure-dev\u003c/id\u003e\n    \t\t\t\u003cactivation\u003e \u003cactiveByDefault\u003efalse\u003c/activeByDefault\u003e \u003c/activation\u003e\n                \u003crepositories\u003e\n                  \u003crepository\u003e\n                    \u003cid\u003eclojars\u003c/id\u003e\n                    \u003curl\u003ehttp://clojars.org/repo/\u003c/url\u003e\n                  \u003c/repository\u003e\n                \u003c/repositories\u003e\n            \u003c/profile\u003e\n            ...\n        \u003c/profiles\u003e\n        ...\n    \u003c/settings\u003e\n\n### Building\n```bash\ngit clone git@github.com:clojure/test.benchmark.git\ncd test.benchmark\nmvn test\n```\n\n### Misc\n```bash\n# starts a swank server\nmvn clojure:swank\n```\n\n### Running a benchmark (e.g. alioth.thread-ring)\n```bash\nscript/run alioth.thread-ring 1000\n```\n\n### Timing a benchmark (e.g. alioth.fasta-redux)\n```bash\ntime script/run alioth.fasta-redux 25000000 \u003e /dev/null\n\nreal\t0m2.389s\nuser\t0m3.329s\nsys\t0m0.115s\n```\n\nIn these results, alioth uses a measurement similar to the `real` timing.\n\n\n### Running a baseline test\nBaseline tests execute a java-equivalent benchmark and compare execution times to the respective clojure benchmarks.\nThe specifications for the baseline tests are in https://github.com/clojure/test.benchmark/blob/master/src/baseline/clojure/baseline/spec.clj\n\n```bash\n# this will pull down the non-CA repo into src/baseline and build\n# Currently some Java programs require JDK 1.7 for Fork/Join library.\nmvn compile -Pbaseline\n\n# afterwards you can execute baseline tests as follows\n\n# default, run all baseline tests 3x, sample and report\nscript/run baseline.exec\n\n# run all baseline tests 10x, sample and report\nscript/run baseline.exec 10\n\n# run mandelbrot and thread-ring baseline tests once and report\nscript/run baseline.exec 1 mandelbrot thread-ring\n({:failures :none,\n  :id \"mandelbrot\",\n  :metrics {:runtime {:baseline 9451.773698, :target 10316.261803}},\n  :tollerances {:runtime 0.25},\n  :sample-size 1}\n {:failures :none,\n  :id \"thread-ring\",\n  :metrics {:runtime {:baseline 4308.804918, :target 309.521524}},\n  :tollerances {:runtime -9.0},\n  :sample-size 1})\n```\n\nTODO: hook baseline test execution into maven test cycle and generate a jenkins-consumable report\n\n## Contributing\nThere are a number of completed benchmarks, but there is a lot more left to do.\nAndy Fingerhut has a suit of benchmarks tailored for Clojure 1.2 and need updated or redone for Clojure 1.3 (https://github.com/jafingerhut/clojure-benchmarks).\n\nA good general approach is to examine the fastest alioth implementations, usually Java or C, and write a Clojure port.\nFast small programs in any language are also worthy of examination. These benchmarks should demonstrate how to write idiomatic high-performance Clojure.\n\nLong term goal is a performance regression test suit ...\n\nAlioth Benchmark site is here: http://shootout.alioth.debian.org/\n\nWork on the benchmarks is tracked here: http://dev.clojure.org/jira/browse/TBENCH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Ftest.benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojure%2Ftest.benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Ftest.benchmark/lists"}