observing / thor

The WebSocket god of thunder
MIT License
1.29k stars 154 forks source link

Bad Data Benchmark options #47

Open d3x0r opened 7 years ago

d3x0r commented 7 years ago

the default option for ws is 'per-message-deflate' this makes the packets that are 1024 bytes of lots of zeros only 16 bytes

b\030\005\243\024\214T\000\000\000\000\377\377\000

Which sort of defeats the data size throughput measurement; you should disable this option when creating a new ws client conneciton. Or generate packets that don't compress to nothing... maybe build them with randomness... hard to gauge real world data and how much it would compress, but it would be somewhere between maximal (all the same byte) and minimal (math.random() for instance)