void incStateTransitionMetric(String partitionName, ReplicaState from, ReplicaState to) {
    String metricName = String.format(stateTransitionMetricTemplate, partitionName, from.toString(), to.toString());
    if (enablePartitionStateTransitionMetrics && !partitionTransitionToCount.containsKey(metricName)) {
      Counter transitionMetric = registry.counter(MetricRegistry.name(HelixParticipant.class, metricName));
      partitionTransitionToCount.put(metricName, transitionMetric);
      transitionMetric.inc();
    }
  }
Creates and increments the metric object for given partition's state transition
@param partitionName partition name
@param from begin state
@param to end state
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipantMetrics.java