{"id":13527828,"url":"https://github.com/paypal/gnomon","last_synced_at":"2025-04-01T10:32:50.801Z","repository":{"id":53825123,"uuid":"53617612","full_name":"paypal/gnomon","owner":"paypal","description":"Utility to annotate console logging statements with timestamps and find slow processes","archived":true,"fork":false,"pushed_at":"2016-11-30T06:11:53.000Z","size":28,"stargazers_count":932,"open_issues_count":11,"forks_count":38,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-02T13:33:43.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/paypal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-10T21:16:30.000Z","updated_at":"2024-09-29T16:28:10.000Z","dependencies_parsed_at":"2022-09-14T00:50:23.464Z","dependency_job_id":null,"html_url":"https://github.com/paypal/gnomon","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fgnomon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fgnomon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fgnomon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fgnomon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paypal","download_url":"https://codeload.github.com/paypal/gnomon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246625638,"owners_count":20807795,"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-08-01T06:02:03.013Z","updated_at":"2025-04-01T10:32:50.522Z","avatar_url":"https://github.com/paypal.png","language":"JavaScript","readme":"# gnomon\n\nA command line utility, a bit like\n[moreutils's **ts**](https://joeyh.name/code/moreutils/), to prepend timestamp\ninformation to the standard output of another command. Useful for long-running\nprocesses where you'd like a historical record of what's taking so long.\n\n## Example\n\n![basic](https://cloud.githubusercontent.com/assets/1643758/13685018/17b4f76c-e6d4-11e5-8838-40fa52346ae8.gif)\n\nPiping anything to `gnomon` will prepend a timestamp to each line, indicating \nhow long that line was the last line in the buffer--that is, how long it took\nthe next line to appear. By default, `gnomon` will display the seconds elapsed\nbetween each line, but that is configurable.\n\nYou can display total time elapsed since the process began:\n![total](https://cloud.githubusercontent.com/assets/1643758/13685020/199b78b2-e6d4-11e5-9083-05de6c52cc60.gif)\n\nYou can display an absolute timestamp:\n![absolute](https://cloud.githubusercontent.com/assets/1643758/13685022/1ab3a5bc-e6d4-11e5-9ccf-3a5c68f9ea0c.gif)\n\nYou can also use the `--high` and/or `--medium` options to specify a length\nthreshold in seconds, over which `gnomon` will highlight the timestamp in red\nor yellow. And you can do a few other things, too.\n\n![fancy](https://cloud.githubusercontent.com/assets/1643758/13685025/1bbf6ad6-e6d4-11e5-8806-e90a6e852bf7.gif)\n\nIf the realtime timestamp updating is distracting or incompatible with your\nterminal, it can be disabled:\n\n![norealtime](https://cloud.githubusercontent.com/assets/1643758/13685027/1cfd823e-e6d4-11e5-9f90-c047d67a35e0.gif)\n\n\n## Options\n\n    --type=\u003celapsed-line|elapsed-total|absolute\u003e        [default: elapsed-line]\n    -t \u003celapsed-line|elapsed-total|absolute\u003e\n\n      Type of timestamp to display.\n        elapsed-line: Number of seconds that displayed line was the last line.\n        elapsed-total: Number of seconds since the start of the process.\n        absolute: An absolute timestamp in UTC.\n\n    --format=\"format\"                                   [default: \"H:i:s.u O\"]\n    -f \"format\"\n\n      Format the absolute timestamp, using PHP date format strings. If the type\n      is elapsed-line or elapsed-total, this option is ignored.\n\n    --ignore-blank                                      [default: false]\n    --quiet\n    -q\n    -i\n\n      Do not prepend a timestamp to blank lines; just pass them through. When\n      this option is active, blank lines will not trigger an update of elapsed\n      time. Therefore, if a lot of blank lines appear, the prior timestamp will\n      display the total time between that line and the next non-blank line\n      (if the type is elapsed-time was selected).\n\n\t--real-time=\u003cnumber|false\u003e                          [default: 500]\n\t-r                                                  [non-tty default: false]\n\n\t  Time increment to use when updating timestamp for the current line, in\n\t  milliseconds. Pass `false` to this option to disable realtime entirely,\n\t  if you need an extra performance boost or you find it distracting. When\n\t  realtime is disabled, the log will always appear one line \"behind\" the\n\t  original piped output, since it can't display the line until it's\n\t  finished timing it.\n\n    --high=seconds\n    -h seconds\n\n      High threshold. If the elapsed time for a line is equal to or higher than\n      this value in seconds, then the timestamp will be colored bright red.\n      This works for all timestamp types, including elapsed-total and absolute,\n      where the elapsed line time is not actually displayed.\n\n    --medium=seconds\n    -m seconds\n\n      Medium threshold. Works just like the high threshold described above, but\n      colors the timestamp bright yellow instead. Can be used in conjunction\n      with a high threshold for three levels.\n\n### Notes\n - If a `high` and/or a `medium` threshold are specified, then all timestamps not\nmeeting that threshold will be colored bright green.\n - If you pipe the output of `gnomon` into another command or a file (that is,\n not a tty) then the `real-time` option will be disabled by default and each line\n will appear only after it has been timed. You can force realtime by sending a\n `--real-time=\u003cms\u003e` argument explicitly, but the ANSI codes would probably\n interfere with whatever you were trying to do. The sane default is to omit fancy\n stuff, like colors and escape sequences, when logging text directly to a file.\n\n## Installation\n\nwith npm do:\n```\nnpm install -g gnomon\n```\n\n## License\n\ngnomon uses the MIT license.\n\n","funding_links":[],"categories":["JavaScript","Uncategorized","Tools","others","Lovely Commands"],"sub_categories":["Uncategorized","React Components","Command line"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fgnomon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaypal%2Fgnomon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fgnomon/lists"}