Update log_total_sample