Statistics: Fix serialization and sampling of end time
Merge branch 'master' into GLStats