mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
report: add queue info for udp
PR-URL: https://github.com/nodejs/node/pull/44345 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
e7b51fbdaf
commit
d9b2d2c0dd
2 changed files with 10 additions and 1 deletions
|
@ -261,7 +261,14 @@ void WalkHandle(uv_handle_t* h, void* arg) {
|
|||
writer->json_keyvalue("writable",
|
||||
static_cast<bool>(uv_is_writable(&handle->stream)));
|
||||
}
|
||||
|
||||
if (h->type == UV_UDP) {
|
||||
writer->json_keyvalue(
|
||||
"writeQueueSize",
|
||||
uv_udp_get_send_queue_size(reinterpret_cast<uv_udp_t*>(h)));
|
||||
writer->json_keyvalue(
|
||||
"writeQueueCount",
|
||||
uv_udp_get_send_queue_count(reinterpret_cast<uv_udp_t*>(h)));
|
||||
}
|
||||
writer->json_end();
|
||||
}
|
||||
|
||||
|
|
|
@ -260,6 +260,8 @@ if (process.argv[2] === 'child') {
|
|||
found_udp.push('connected');
|
||||
}
|
||||
assert(handle.is_referenced);
|
||||
assert.strictEqual(handle.writeQueueSize, 0);
|
||||
assert.strictEqual(handle.writeQueueCount, 0);
|
||||
}, 2),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue