class ThreadMetrics {

    public static Sensor commitOverTasksSensor(final String threadId,
                                               final StreamsMetricsImpl streamsMetrics) {
        final Sensor commitOverTasksSensor =
            streamsMetrics.threadLevelSensor(threadId, COMMIT, Sensor.RecordingLevel.DEBUG);
        final Map<String, String> tagMap = streamsMetrics.taskLevelTagMap(threadId, ROLLUP_VALUE);
        addInvocationRateAndCountToSensor(
            commitOverTasksSensor,
            TASK_LEVEL_GROUP,
            tagMap,
            COMMIT,
            COMMIT_OVER_TASKS_RATE_DESCRIPTION,
            COMMIT_OVER_TASKS_TOTAL_DESCRIPTION
        );
        return commitOverTasksSensor;
    }

    private  ThreadMetrics();

}