From the Oracle docs.
A number representing one or more statistics class. The following class numbers are additive:
1 - User
2 - Redo
4 - Enqueue
8 - Cache
16 - OS
32 - Real Application Clusters
64 - SQL
128 - Debug
It there a standard solution for taking say 22 and decoding that into 16, 4, and 2? My first guess would be to create an object which holds every possible combination and use that as a lookup? Is there a better solution using binary or something? Preferred solution would by in Python. (disclaimer: This is not homework.)