{"id":16476036,"url":"https://github.com/softprops/cappi","last_synced_at":"2025-06-27T23:05:26.213Z","repository":{"id":10156400,"uuid":"12236052","full_name":"softprops/cappi","owner":"softprops","description":"the sweetest sbt plugin your microbenchmarks will ever meet","archived":false,"fork":false,"pushed_at":"2019-03-02T17:22:14.000Z","size":21,"stargazers_count":17,"open_issues_count":6,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-21T00:06:44.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"febobo/react-native-redux-FeInn","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.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":"2013-08-20T06:19:50.000Z","updated_at":"2020-12-02T17:19:36.000Z","dependencies_parsed_at":"2022-09-10T03:12:19.704Z","dependency_job_id":null,"html_url":"https://github.com/softprops/cappi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/softprops/cappi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fcappi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fcappi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fcappi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fcappi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/cappi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fcappi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262347474,"owners_count":23296894,"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-11T12:41:22.405Z","updated_at":"2025-06-27T23:05:26.191Z","avatar_url":"https://github.com/softprops.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cappi\n\n\u003e The [sweetest](http://www.urbandictionary.com/define.php?term=cappi) [sbt](http://www.scala-sbt.org/) plugin your [microbenchmarks](https://code.google.com/p/caliper/wiki/JavaMicrobenchmarks) will ever meet.\n\nCappi runs [Caliper](https://code.google.com/p/caliper/) benchmarks\n\n## Install\n\nThis project targets sbt version [0.13](http://www.scala-sbt.org/0.13.0/docs/home.html). If you should want 0.12 support [drop me an issue](https://github.com/softprops/cappi/issues/new?title=add%20support%20for%20sbt%200.12)\n\nTo install Cappi in your sbt project, add the following to your project's plugin configuration, typically in a `project/plugins.sbt` file.\n\n```scala\nresolvers += Resolver.url(\n  \"bintray-sbt-plugin-releases\",\n    url(\"http://dl.bintray.com/content/sbt/sbt-plugin-releases\"))(\n      Resolver.ivyStylePatterns)\n\naddSbtPlugin(\"me.lessis\" % \"cappi\" % \"0.1.1\")\n```\n\nThen mix `cappiSettings` into your build defintion, typically in a `build.sbt` file.\n\n```scala\nseq(cappiSettings:_*)\n```\n\n## Usage\n\nCappi will run your benchmarks, but it needs to know _what_ they are first. By default, Cappi defines two tasks to run your bench marks `benchmark` and `benchmarkOnly` both scoped to the `cappi` task. \n\n### Resolving Benchmarks\n\nIn order to run `benchmarks` Cappi makes the assumption that you've named your benchmark in a source file with a name ending with \"Benchmark.scala\".\nCappi will look for this under your `src/test/scala` directory. It makes the assumption that you are packaging your benchmarks in folders that mirror\nthe scala package they are under.\n\nFor example, the class `foo.BarBenchmark`\n\n```scala\npackage foo\nclass BarBenchmark extends com.google.caliper.SimpleBenchmark {\n // ...\n}\n```\n\nwould be expected to be located in a file named `src/test/scala/foo/BarBenchmark.scala`\n\nYou can see the full list of resolved benchmark class names by running the following the the sbt REPL\n\n```scala\nshow cappi::benchmarks\n```\n\nAlternatively, you can override the `benchmarks` setting in your build definition\n\n```scala\n(cappi.Keys.benchmarks in cappi.Keys.cappi) := Seq(\"foo.BazBenchmark\")\n```\n\n### Running Benchmarks\n\nTo run your benchmarks, simply run the following in the sbt REPL. This will run all benchmarks.\n\n```scala\ncappi::benchmark\n```\n\nAlternatively you can run just a target benchmark with `benchmarkOnly` providing a fully qualified Benchmark class name.\n\n```scala\ncappi::benchmarkOnly com.you.YourBenchmark\n```\n\n### Caliper on your classpath\n\nTo run benchmarks, you need to first write benchmarks. To write benchmarks you need caliper on your classpath.\nTo remove the need for you doing this yourself, Cappi will add caliper to your _test_ classpath. This make getting started\na much smoother process.\n\nTo override the calpier version in use, \"0.5-rc1\" by default, override the `caliperVersion` setting.\n\n```scala\ncaliperVersion in cappi := Some(\"custom-version\")\n```\n\nIf you do not wish to have Cappi add this to your test classpath for some reason, say your benchmarks are not actually under\nyour test class path. Set the `caliperVersion` setting to `None`\n\n```scala\ncaliperVersion in cappi := None\n```\n\n## props\n\nThis plugin continues on the path that [this plugin](https://github.com/alno/sbt-caliper) started.\n\nDoug Tangren (softprops) 2013\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fcappi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Fcappi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fcappi/lists"}