Statistics: Fix serialization and sampling of end time