This topic applies to Java version only
QueryStarted and QueryFinished events can be used to gather various statistics about query execution.
For example you can use queryStarted() and queryFinished() events to calculate query time, and activated() event to count objects activated in a query.