the code should be called right after we obtain the GL context. Don't forget to reset/edit ignoreCommands if you intend to capture some of those.
fakeGl.captureOperations(40)
...
fakeGl.ignoreCommands = []
fakeGl.setHistogramMode(true)
fakeGl.captureFrames(1)
...
fakeGl.setHistogramMode(false)