Example code is showing overriding Object Manager adding functionality to gather statistics.
Unit tests is in tests directory.
info at phpclasses dot org