{"id":16660460,"url":"https://github.com/killme2008/prowl","last_synced_at":"2025-09-05T10:47:14.107Z","repository":{"id":8858749,"uuid":"10568916","full_name":"killme2008/prowl","owner":"killme2008","description":"A clojure macro and ruby script to profile clojure program.","archived":false,"fork":false,"pushed_at":"2013-06-08T13:50:22.000Z","size":124,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-12T20:48:58.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"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/killme2008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-08T13:32:58.000Z","updated_at":"2014-05-10T07:01:12.000Z","dependencies_parsed_at":"2022-08-27T20:52:25.006Z","dependency_job_id":null,"html_url":"https://github.com/killme2008/prowl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/killme2008/prowl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fprowl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fprowl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fprowl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fprowl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killme2008","download_url":"https://codeload.github.com/killme2008/prowl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fprowl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273747797,"owners_count":25160651,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:29:22.499Z","updated_at":"2025-09-05T10:47:13.813Z","avatar_url":"https://github.com/killme2008.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prowl\n\nA Clojure library designed to profile clojure program.\n\n## Usage\n\nAdd it to project.clj dependencies:\n\n\t[prowl \"0.1.0-SNAPSHOT\"]\n\t\nUse it in your clojure code:\n\n```clojure\n(use '[prowl.core :only [p]])\n\n(defn method1 []\n\t(p :method1\n\t\t(Thread/sleep 100)))\n(defn method2 []\n\t(p :method2\n\t\t(Thread/sleep 10)))\n\n(defn logic []\n\t(p :logic :start (do (method1) (method2))))\n\t\n(logic)\t\n```\n\nOuput log using `clojure.tools.logging`:\n```\n[WARN] 06-08 21:27:58,475 [user] - [prowl-profiler] nREPL-worker-0 logic-1370698078328153000 method1 : 145.903  msecs\n[WARN] 06-08 21:27:58,487 [user] - [prowl-profiler] nREPL-worker-0 logic-1370698078328153000 method2 : 10.807  msecs\n[WARN] 06-08 21:27:58,487 [user] - [prowl-profiler] nREPL-worker-0 logic-1370698078328153000 start : 159.588  msecs\n```\n\nSave the log in file `test.log`,download [parse.rb](https://github.com/killme2008/prowl/blob/master/parse.rb) to parse the log file:\n```\nruby parse.rb  -f test.log\n```\n\nOutput the statistics result:\n```\nParsing log file test.log ...\nProwl profile results:\nLabels:\n  Label:logic count:1\n    Method: method2                                        mean: 10.81      min: 10.81      max: 10.81      count: 1\n    Method: method1                                        mean: 145.90     min: 145.90     max: 145.90     count: 1\n    Method: start                                          mean: 159.59     min: 159.59     max: 159.59     count: 1\n\nMethods:\n  Method: method2                                        mean: 10.81      min: 10.81      max: 10.81      count: 1\n  Method: method1                                        mean: 145.90     min: 145.90     max: 145.90     count: 1\n  Method: start                                          mean: 159.59     min: 159.59     max: 159.59     count: 1\n```\n\nThe `mean`,`max` and `min` value are in milliseconds.\n\n`p` macro accepts label name,method name and expression:\n```clojure\n(p :label :method expr)\n(p :method expr)\n```\nIf you don't provide `label`,the default label is `no-label`.Once you profile expression with a `label`,the nested invocation of `(p :method expr)` will use the thread-bound label.\n\nDisable profiling by set environment varibale `PROWL_PROFILE` to be false before startup program:\n```shell\nexport PROWL_PROFILE=false\n```\n\n## License\n\nCopyright © 2013 FIXME\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillme2008%2Fprowl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillme2008%2Fprowl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillme2008%2Fprowl/lists"}