{"id":17330625,"url":"https://github.com/adam12/rack-server-timing","last_synced_at":"2025-03-27T06:12:53.804Z","repository":{"id":65111224,"uuid":"157035741","full_name":"adam12/rack-server-timing","owner":"adam12","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-27T16:06:09.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T02:12:30.550Z","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/adam12.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-11T01:00:22.000Z","updated_at":"2024-12-27T16:06:13.000Z","dependencies_parsed_at":"2024-05-02T01:55:47.513Z","dependency_job_id":"a64102ef-d7a7-48ae-baaf-4cd80c786bc2","html_url":"https://github.com/adam12/rack-server-timing","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/adam12%2Frack-server-timing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-server-timing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-server-timing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Frack-server-timing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam12","download_url":"https://codeload.github.com/adam12/rack-server-timing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791972,"owners_count":20672671,"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-15T14:51:52.521Z","updated_at":"2025-03-27T06:12:53.785Z","avatar_url":"https://github.com/adam12.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Timing for Rack\n\nEasily record and emit Server-Timing headers in your Rack applications.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"rack-server-timing\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rack-server-timing\n\n## Usage in a Rack application\n\nSimply require and add middleware:\n\n```ruby\n# config.ru\nrequire \"rack-server-timing/middleware\"\n\nuse RackServerTiming::Middleware\n\nrun -\u003e(env) {\n  [200, {}, [\"It Works!\"]]\n}\n```\n\nAnd then record your metrics:\n\n```ruby\nenv[\"rack.server_timing\"].record(\"DB\", 200)\n```\n\n## Usage in a Roda application\n\nEnable the plugin `server_timing` after `render` (if you wish to have the rendering profiled automatically).\n\n```ruby\nclass App \u003c Roda\n  plugin :render # Optional\n  plugin :server_timing\nend\n```\n\nA convenient `server_timing` helper is available to quickly `record` or `benchmark`\ntiming values.\n\n## Sequel timing\n\nEnable the `server_timing` extension in your database instance. This extension will automatically create a\nnull logging instance if there is no logging configured so there _may_ be a small performance hit.\n\n```ruby\nDB = Sequel.connect\n\nDB.extension :server_timing\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/adam12/rack-server-timing.\n\nI love pull requests! If you fork this project and modify it, please ping me to see\nif your changes can be incorporated back into this project.\n\nThat said, if your feature idea is nontrivial, you should probably open an issue to\n[discuss it](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)\nbefore attempting a pull request.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Frack-server-timing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam12%2Frack-server-timing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Frack-server-timing/lists"}