There are two methods in MetricsServiceCassandra for inserting metric data,
Each method takes a list of metrics, and each metric can include one or more data points. We perform a batch insert for each metric. So if the metrics argument is of size N, then N batch inserts are performed. We want to batch writes of data points belonging to the same metric makes whenever possible. Since those writes go to the same partition, Cassandra will perform those mutations efficiently and atomically.
Batching writes from multiple metrics can improve write performance, substantially in some cases. These methods should be refactored as necessary to batch writes across multiple metrics. There is the question of optimal batch size, but I do not think we need to try and answer that question with this ticket.