You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

149 lines
4.1 KiB

=================================================
uasync timeout benchmark: with vs without sockets
=================================================
=== Test 1: Zero timeouts WITHOUT sockets ===
Set 100 zero timeouts: 0.008 ms (0.078 us/op)
Mainloop 100 iterations: 0.021 ms (0.207 us/iter)
🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x5c6b4805c2b0
Timer Statistics: allocated=100, freed=100, active=0
Socket Statistics: allocated=0, freed=0, active=0
Active timers in heap: 0
Socket array capacity: 16, active: 0
Total active sockets: 0
🔚 BEFORE_DESTROY: End of resource report
=== Test 2: Zero timeouts WITH 100 sockets ===
Created 100 sockets
Set 100 zero timeouts: 0.004 ms (0.044 us/op)
Mainloop 100 iterations: 0.020 ms (0.197 us/iter)
🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x5c6b4805c360
Timer Statistics: allocated=100, freed=100, active=0
Socket Statistics: allocated=100, freed=0, active=100
Active timers in heap: 0
Socket array capacity: 128, active: 100
Socket: fd=6, active=1
Socket: fd=7, active=1
Socket: fd=8, active=1
Socket: fd=9, active=1
Socket: fd=10, active=1
Socket: fd=11, active=1
Socket: fd=12, active=1
Socket: fd=13, active=1
Socket: fd=14, active=1
Socket: fd=15, active=1
Socket: fd=16, active=1
Socket: fd=17, active=1
Socket: fd=18, active=1
Socket: fd=19, active=1
Socket: fd=20, active=1
Socket: fd=21, active=1
Socket: fd=22, active=1
Socket: fd=23, active=1
Socket: fd=24, active=1
Socket: fd=25, active=1
Socket: fd=26, active=1
Socket: fd=27, active=1
Socket: fd=28, active=1
Socket: fd=29, active=1
Socket: fd=30, active=1
Socket: fd=31, active=1
Socket: fd=32, active=1
Socket: fd=33, active=1
Socket: fd=34, active=1
Socket: fd=35, active=1
Socket: fd=36, active=1
Socket: fd=37, active=1
Socket: fd=38, active=1
Socket: fd=39, active=1
Socket: fd=40, active=1
Socket: fd=41, active=1
Socket: fd=42, active=1
Socket: fd=43, active=1
Socket: fd=44, active=1
Socket: fd=45, active=1
Socket: fd=46, active=1
Socket: fd=47, active=1
Socket: fd=48, active=1
Socket: fd=49, active=1
Socket: fd=50, active=1
Socket: fd=51, active=1
Socket: fd=52, active=1
Socket: fd=53, active=1
Socket: fd=54, active=1
Socket: fd=55, active=1
Socket: fd=56, active=1
Socket: fd=57, active=1
Socket: fd=58, active=1
Socket: fd=59, active=1
Socket: fd=60, active=1
Socket: fd=61, active=1
Socket: fd=62, active=1
Socket: fd=63, active=1
Socket: fd=64, active=1
Socket: fd=65, active=1
Socket: fd=66, active=1
Socket: fd=67, active=1
Socket: fd=68, active=1
Socket: fd=69, active=1
Socket: fd=70, active=1
Socket: fd=71, active=1
Socket: fd=72, active=1
Socket: fd=73, active=1
Socket: fd=74, active=1
Socket: fd=75, active=1
Socket: fd=76, active=1
Socket: fd=77, active=1
Socket: fd=78, active=1
Socket: fd=79, active=1
Socket: fd=80, active=1
Socket: fd=81, active=1
Socket: fd=82, active=1
Socket: fd=83, active=1
Socket: fd=84, active=1
Socket: fd=85, active=1
Socket: fd=86, active=1
Socket: fd=87, active=1
Socket: fd=88, active=1
Socket: fd=89, active=1
Socket: fd=90, active=1
Socket: fd=91, active=1
Socket: fd=92, active=1
Socket: fd=93, active=1
Socket: fd=94, active=1
Socket: fd=95, active=1
Socket: fd=96, active=1
Socket: fd=97, active=1
Socket: fd=98, active=1
Socket: fd=99, active=1
Socket: fd=100, active=1
Socket: fd=101, active=1
Socket: fd=102, active=1
Socket: fd=103, active=1
Socket: fd=104, active=1
Socket: fd=105, active=1
Total active sockets: 100
🔚 BEFORE_DESTROY: End of resource report
=================================================
COMPARISON
=================================================
Set 100 timeouts:
Without sockets: 0.008 ms (0.078 us/op)
With 100 sockets: 0.004 ms (0.044 us/op)
Difference: -43.30%
Mainloop 100 iterations:
Without sockets: 0.021 ms (0.207 us/iter)
With 100 sockets: 0.020 ms (0.197 us/iter)
Difference: -4.90%
=================================================