collecting runtime statistics