fix & improve output of metric_stats and sample_rate. fixes #1