update context statistics