{"id":20636819,"url":"https://github.com/tombenner/profiler","last_synced_at":"2025-06-11T14:37:47.760Z","repository":{"id":30254647,"uuid":"33805946","full_name":"tombenner/profiler","owner":"tombenner","description":"Easy, targeted Ruby profiling","archived":false,"fork":false,"pushed_at":"2015-07-19T17:16:10.000Z","size":116,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T22:19:40.660Z","etag":null,"topics":["instrumentation","performance","performance-metrics","profiler","ruby","ruby-performance"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tombenner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-12T06:26:59.000Z","updated_at":"2022-12-30T14:00:41.000Z","dependencies_parsed_at":"2022-08-20T16:50:23.910Z","dependency_job_id":null,"html_url":"https://github.com/tombenner/profiler","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/tombenner%2Fprofiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenner%2Fprofiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenner%2Fprofiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenner%2Fprofiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tombenner","download_url":"https://codeload.github.com/tombenner/profiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenner%2Fprofiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259280800,"owners_count":22833450,"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":["instrumentation","performance","performance-metrics","profiler","ruby","ruby-performance"],"created_at":"2024-11-16T15:12:14.629Z","updated_at":"2025-06-11T14:37:47.731Z","avatar_url":"https://github.com/tombenner.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Profiler\n========\nEasy, targeted Ruby profiling\n\nOverview\n--------\n\nProfiler lets you easily measure the time spent in specified code paths.\n\nIf a certain code path is taking some time, call `Profiler.start` before it, `Profiler.stop` after it, and `Profiler.check` at significant checkpoints throughout it. For each edge (where an edge is a path between two `Profiler.check` calls), Profiler will print the cumulative time spent in the path and the number of times it was called:\n\n```ruby\nclass MyClass\n  def initialize\n    Profiler.start\n    do_something\n    Profiler.stop\n  end\n\n  def do_something\n    # ...\n    Profiler.check\n    # ...\n    Profiler.check\n    # ...\n    100.times do\n      Profiler.check\n      # ...\n    end\n  end\nend\n```\n\n```\nTime      Calls Path\n0.01509   1     my_class.rb:75:in `do_something' -\u003e my_class.rb:84:in `block in do_something'\n0.0126    100   my_class.rb:84:in `block in do_something' -\u003e my_class.rb:84:in `block in do_something'\n0.00027   1     my_class.rb:84:in `block in do_something' -\u003e my_class.rb:111:in `do_something'\n0.00015   1     my_class.rb:3:in `initialize' -\u003e my_class.rb:62:in `do_something'\n0.0001    1     my_class.rb:62:in `do_something' -\u003e my_class.rb:75:in `do_something'\n5.0e-05   1      -\u003e my_class.rb:3:in `initialize'\nTotal time: 0.028271198272705078\n```\n\nInstallation\n------------\n\nAdd Profiler to your Gemfile:\n\n```ruby\ngem 'profiler'\n```\n\nLicense\n-------\n\nProfiler is released under the MIT License. Please see the MIT-LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombenner%2Fprofiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftombenner%2Fprofiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombenner%2Fprofiler/lists"}