{"id":16787811,"url":"https://github.com/sastan/fastify-server-timing","last_synced_at":"2025-07-01T07:08:14.936Z","repository":{"id":44663073,"uuid":"306020528","full_name":"sastan/fastify-server-timing","owner":"sastan","description":"Server-Timing for fastify.","archived":false,"fork":false,"pushed_at":"2022-02-01T11:38:34.000Z","size":152,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T06:44:27.428Z","etag":null,"topics":["fastify","fastify-plugin","plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sastan.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":"2020-10-21T12:40:53.000Z","updated_at":"2024-10-01T20:25:11.000Z","dependencies_parsed_at":"2022-08-31T14:11:27.892Z","dependency_job_id":null,"html_url":"https://github.com/sastan/fastify-server-timing","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sastan/fastify-server-timing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sastan%2Ffastify-server-timing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sastan%2Ffastify-server-timing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sastan%2Ffastify-server-timing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sastan%2Ffastify-server-timing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sastan","download_url":"https://codeload.github.com/sastan/fastify-server-timing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sastan%2Ffastify-server-timing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262634189,"owners_count":23340436,"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":["fastify","fastify-plugin","plugin"],"created_at":"2024-10-13T08:16:02.993Z","updated_at":"2025-07-01T07:08:14.914Z","avatar_url":"https://github.com/sastan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-server-timing\n\n[Server-Timing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing) for [fastify](https://fastify.io) to communicate one or more metrics and descriptions for a given request-response cycle. It is used to surface any backend server timing metrics (e.g. database read/write, CPU time, file system access, etc.) in the developer tools in the user's browser or in the [PerformanceServerTiming](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceServerTiming) interface.\n\n[![License](https://flat.badgen.net/npm/license/fastify-server-timing)](https://github.com/sastan/fastify-server-timing/blob/main/LICENSE)\n[![Latest Release](https://flat.badgen.net/npm/v/fastify-server-timing?label=release)](https://www.npmjs.com/package/fastify-server-timing)\n[![Node Version](https://flat.badgen.net/npm/node/fastify-server-timing?color=blue)](https://nodejs.org/)\n[![Fastify Version](https://flat.badgen.net/badge/fastify/3.x/blue)](https://fastify.io)\n[![Typescript](https://flat.badgen.net/badge/icon/included?icon=typescript\u0026label)](https://unpkg.com/browse/fastify-server-timing/dist/index.d.ts)\n[![Sponsor](https://flat.badgen.net/badge/sponsored%20by/Kenoxa/2980b9)](https://www.kenoxa.com)\n\n## Installation\n\n```sh\nnpm install fastify-server-timing\n```\n\n## Usage\n\nRegister the plugin and if needed pass to it some custom options.\n\n```js\nconst fastify = require('fastify')()\n\n// using the defaults\nfastify.register(require('fastify-server-timing'))\n\n// with custom options\nfastify.register(require('fastify-server-timing'), { /* ... Options ... */ })\n\n// use reply.addServerTiming to report a metric\nfastify.get('/', (request, reply) =\u003e {\n  reply.addServerTiming('cache', 23.2, 'Cache Read')\n  return {}\n})\n```\n\n## API\n\n- [Options](https://github.com/sastan/fastify-server-timing/blob/main/docs/interfaces/options.md#interface-options)\n- [reply.addServerTiming](https://github.com/sastan/fastify-server-timing/blob/main/docs/interfaces/addservertiming.md#interface-addservertiming)(`name`: string, `duration?`: undefined \\| number, `description?`: undefined \\| string): void\n\n## Support\n\nThis project is free and open-source, so if you think this project can help you or anyone else, you may [star it on GitHub](https://github.com/sastan/fastify-server-timing). Feel free to [open an issue](https://github.com/sastan/fastify-server-timing/issues) if you have any idea, question, or you've found a bug.\n\n## Contribute\n\nThanks for being willing to contribute!\n\n**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)\n\nWe are following the [Conventional Commits](https://www.conventionalcommits.org) convention.\n\n### Develop\n\n- `npm test`: Run test suite\n- `npm run build`: Generate bundles\n- `npm run lint`: Lints code\n\n## Sponsors\n\n[![Kenoxa GmbH](https://images.opencollective.com/kenoxa/9c25796/logo/68.png)](https://www.kenoxa.com) [Kenoxa GmbH](https://www.kenoxa.com)\n\n## License\n\n[MIT](https://github.com/sastan/fastify-server-timing/blob/main/LICENSE) © [Sascha Tandel](https://github.com/sastan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsastan%2Ffastify-server-timing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsastan%2Ffastify-server-timing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsastan%2Ffastify-server-timing/lists"}