[stats] Add ability to flush the nodes