{"id":18016904,"url":"https://github.com/fitzgen/tokio-timeit-middleware","last_synced_at":"2025-03-26T18:32:32.319Z","repository":{"id":57670119,"uuid":"67852856","full_name":"fitzgen/tokio-timeit-middleware","owner":"fitzgen","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-06T02:11:45.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T11:59:45.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitzgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-10T05:29:42.000Z","updated_at":"2017-04-06T02:06:34.000Z","dependencies_parsed_at":"2022-09-26T20:40:47.244Z","dependency_job_id":null,"html_url":"https://github.com/fitzgen/tokio-timeit-middleware","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Ftokio-timeit-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Ftokio-timeit-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Ftokio-timeit-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Ftokio-timeit-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzgen","download_url":"https://codeload.github.com/fitzgen/tokio-timeit-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245713146,"owners_count":20660353,"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-30T04:19:38.959Z","updated_at":"2025-03-26T18:32:32.059Z","avatar_url":"https://github.com/fitzgen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tokio-timeit-middleware\n\n\u003cimg src=\"https://img.shields.io/crates/v/tokio-timeit-middleware.svg\" alt=\"tokio-timeit-middleware’s current version badge\" title=\"tokio-timeit-middleware’s current version badge\"\u003e\n\nTime how long it takes your Tokio `Service` to send a `Service::Response` in\nreply to a `Service::Request`.\n\n## Usage\n\nFirst, add this to your Cargo.toml:\n\n```toml\n[dependencies]\ntokio-timeit-middleware = { git = \"https://github.com/fitzgen/tokio-timeit-middleware\" }\n```\n\nNext, add this to your crate:\n\n```rust\nextern crate tokio_timeit_middleware;\n```\n\nTo time your Tokio `Service`'s request/response times, wrap it in\n`tokio_timeit_middleware::Timeit`:\n\n```rust\nlet timed_service = Timeit::new(my_tokio_service, Rc::new(|duration| {\n    println!(\"Responded to request in {}\", duration);\n));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Ftokio-timeit-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitzgen%2Ftokio-timeit-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Ftokio-timeit-middleware/lists"}