I assume you mean the while() code that follows? It is very similar in the TimeCollector and MemoryCollector, but they are differences. They reference different fields, and the logic for dealing with the first element of the array is a little different too.