« Previous | Next » 

Revision e4d452b4

IDe4d452b4f896b0b7eb87dae696fdf0796e481525

Added by Michael Hanselmann over 10 years ago

Add lock performance utility

I had an idea for improving locking performance. To see if it worked I
wrote this tool. Unfortunately the idea didn't quite work (broke
unittests left and right), but the tool is still handy for evaluating
future changes to the “SharedLock” class.

It is not installed or run at build/test time. In its current form it is
intended for manual use. Example output:

---
Total number of acquisitions: 32642
Per-thread acquisitions:
Thread 0: 6536 (20.0%)
Thread 1: 6488 (19.9%)
Thread 2: 6536 (20.0%)
Thread 3: 6529 (20.0%)
Thread 4: 6553 (20.1%)
Benchmark CPU time: 5.010s
Average time per lock acquisition: 0.15348ms
Process:
User time: 4.160s
System time: 1.030s
Total time: 5.190s
---

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences