{"id":13659933,"url":"https://github.com/node4good/asynctrace","last_synced_at":"2025-05-07T19:21:14.164Z","repository":{"id":17329430,"uuid":"20100489","full_name":"node4good/asynctrace","owner":"node4good","description":"Deep stack traces based on AsyncListener API","archived":false,"fork":false,"pushed_at":"2025-01-13T22:44:50.000Z","size":55,"stargazers_count":38,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-20T01:33:07.657Z","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/node4good.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-05-23T13:28:33.000Z","updated_at":"2025-01-13T22:44:21.000Z","dependencies_parsed_at":"2025-04-20T01:32:28.334Z","dependency_job_id":"d87c4300-6d44-4919-b578-bcd8c2c55ac6","html_url":"https://github.com/node4good/asynctrace","commit_stats":null,"previous_names":["thenodeils/asynctrace"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fasynctrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fasynctrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fasynctrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fasynctrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node4good","download_url":"https://codeload.github.com/node4good/asynctrace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252941385,"owners_count":21828866,"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-02T05:01:13.986Z","updated_at":"2025-05-07T19:21:14.123Z","avatar_url":"https://github.com/node4good.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"asynctrace\n==========\n\nDeep stack traces based on AsyncListener API\n\n[![Build Status](https://travis-ci.org/Empeeric/asynctrace.png?branch=master \"Build Status\")](https://travis-ci.org/Empeeric/asynctrace)\n\n\n## Install\nYou know the drill\n```\nnpm i asynctrace --save-dev\n```\n\n## Example Usage\n```js\n// simply require, somewhere near the process entry point\nrequire('asynctrace')\n```\n\nspecificaly made compatible with mocha\n```\nmocha --require asynctrace\n```\n\n\n## Example\nfor this code:\n```\n'use strict';\nrequire('asynctrace')\n\nsetImmediate(function a() {\n    setImmediate(function b() {\n        setImmediate(function c() {\n            setImmediate(function d() {\n                setImmediate(function e() {\n                    throw new Error('gaga');\n                });\n            });\n        });\n    });\n});\n```\nYou'll get the following stack trace:\n```\n                    throw new Error('gaga');\n                          ^\nError: gaga\n    at Immediate.e [as _onImmediate] (C:\\projects\\trowExample\\trowwer.js:9:27)\n    at processImmediate [as _immediateCallback] (timers.js:374:17)\n     - - - - - - async boundary  - - - - - -\n    at Immediate.d [as _onImmediate] (C:\\projects\\trowExample\\trowwer.js:8:17)\n     - - - - - - async boundary  - - - - - -\n    at Immediate.c [as _onImmediate] (C:\\projects\\trowExample\\trowwer.js:7:13)\n     - - - - - - async boundary  - - - - - -\n    at Immediate.b [as _onImmediate] (C:\\projects\\trowExample\\trowwer.js:6:9)\n     - - - - - - async boundary  - - - - - -\n    at Immediate.a [as _onImmediate] (C:\\projects\\trowExample\\trowwer.js:5:5)\n     - - - - - - async boundary  - - - - - -\n    at Object.\u003canonymous\u003e (C:\\projects\\trowExample\\trowwer.js:4:1)\n     - - - - - - async boundary  - - - - - -\n```\n\n\n## Performance\nThere is a performance price with using AsyncListner, but we were able to minimize it. For example here are timing on running the full visionmedia/express test suite:\n```\n[10:50:28 /empeeric/3party/express] time  mocha --require asynctrace --require test/support/env --reporter dot --check-leaks test/ test/acceptance/\n\n  ..................................................................\n\n  513 passing (7s)\n\nreal    0m8.061s\nuser    0m0.045s\nsys     0m0.075s\n\n\n\n[10:50:41 /empeeric/3party/express] time  mocha --require test/support/env --reporter dot --check-leaks test/ test/acceptance/\n\n  ..................................................................\n\n  513 passing (5s)\n\nreal    0m6.314s\nuser    0m0.030s\nsys     0m0.075s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fasynctrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode4good%2Fasynctrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fasynctrace/lists"}