fako1024/slimcap

Provide zero-overhead mode for mock sources

Closed this issue · 1 comments

Right now the mock sources have to be continuously populated with mock data via their AddPacket() method. While closely mimicking the concept of a packet (ring) buffer this causes significant overhead (actually taking more CPU time than the actual consumption off the mock wire), skewing in particular benchmarks. In addition, it could help to provide a simpler way than manually having to populate the buffer.

Depends on #7 / #14

DoD

  • Assess requirements (zero-overhead, simplification, ... while keeping flexibility)
  • Implement extensions
  • Adapt existing tests (+ more importantly benchmarks)

Block profile retrieved during a high-throughput benchmark using continuous population of the buffer. As can be seen, about two thirds of the time are spent waiting on channels (CPU usage never goes above about 30%):
pprof001