node-modules / urllib

Request HTTP(s) URLs in a complex world.
MIT License
725 stars 114 forks source link

feat: export agent pool stats #481

Closed fengmk2 closed 7 months ago

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5bb3a62) 98.76% compared to head (16e93b5) 98.79%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #481 +/- ## ========================================== + Coverage 98.76% 98.79% +0.03% ========================================== Files 10 10 Lines 1542 1583 +41 Branches 268 272 +4 ========================================== + Hits 1523 1564 +41 Misses 19 19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fengmk2 commented 7 months ago
after sleep stats: {
  'http://localhost:64466': { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 },
  'http://registry.npmjs.org/': { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 },
  'https://registry.npmjs.org/': { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 },
  'http://localhost:64488': { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 },
  'http://localhost:64490': { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 }
}
fengmk2 commented 7 months ago

undici 的几个 Claas 的关系:

Agent --> (orgin: pool) Pool -> Client
    |
    +-> (orgin: client, connections = 1) Client