pub fn samples_to_csv(samples: &[Sample], interval_secs: u64) -> String
Serialize a slice of samples as a complete CSV string (header + rows).