{"id":18974993,"url":"https://github.com/bufferapp/buffer-js-chronos","last_synced_at":"2026-04-08T18:30:17.239Z","repository":{"id":65840769,"uuid":"78201674","full_name":"bufferapp/buffer-js-chronos","owner":"bufferapp","description":"A small library to handle browsers timing api","archived":false,"fork":false,"pushed_at":"2017-08-19T00:22:20.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-30T23:46:54.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bufferapp.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":"2017-01-06T11:39:14.000Z","updated_at":"2017-03-31T16:55:09.000Z","dependencies_parsed_at":"2023-02-13T14:10:12.694Z","dependency_job_id":null,"html_url":"https://github.com/bufferapp/buffer-js-chronos","commit_stats":null,"previous_names":["bufferapp/chronos"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-chronos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-chronos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-chronos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-js-chronos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bufferapp","download_url":"https://codeload.github.com/bufferapp/buffer-js-chronos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239972519,"owners_count":19727395,"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-11-08T15:16:54.519Z","updated_at":"2026-04-08T18:30:17.191Z","avatar_url":"https://github.com/bufferapp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chronos\nA small library to handle browser timining measures\n\n## How To\n\ninstall it \n```\nnpm i --save @bufferapp/chronos\nimport chronos from '@bufferapp/chronos';\nconst ch = chronos();\n```\n\nThe simplest way to measure something is to start the measure with `ch.startMeasure('bar')` and then stop it `ch.stopMeasure('bar')`.\nTo store the measure you should define a storing method when you instatiate Chronos passing it down in the configuration options\n\n```\nconst ch = chronos({\n  store: (data) =\u003e {\n    …\n  }\n})\n```\n\nWhen that is provided Chronos will auto save the measures for you.\nChronos is using `requestIdleCallback` to parse and store measures, so autosave won't effect your app performances, anyway you are free to disable this behaviour setting `autoSave: false` in the options.\nIn this case you can manually save measures with `ch.saveToStore()`.\n\nYou can measure anything against browser timing event with `ch.measureFromSpecialEvent({ name: 'foo', eventName: 'navigationStart' })`, there is also a convenient method to measure against Navigation Start `ch.measureFromNavigationStart('foo')`.\n\nIf you want to store any extra data along with your measures you can pass a `data` object in measure start options `ch.startMeasure({name: 'foo', data: {tags: ['foo', 'bar']}})`, the data field will be passed down to your store method.\n\nHappy measuring!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-js-chronos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbufferapp%2Fbuffer-js-chronos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-js-chronos/lists"}