record sorting process and replay in histogram