maedhroz commented on code in PR #2534: URL: https://github.com/apache/cassandra/pull/2534#discussion_r1311121573
########## src/java/org/apache/cassandra/metrics/AccordMetrics.java: ########## @@ -0,0 +1,279 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.metrics; + +import java.lang.reflect.Field; +import java.util.concurrent.TimeUnit; + +import accord.api.EventsListener; +import accord.local.Command; +import accord.primitives.Deps; +import accord.primitives.PartialDeps; +import accord.primitives.Timestamp; +import accord.primitives.TxnId; +import com.codahale.metrics.Counting; +import com.codahale.metrics.Histogram; +import com.codahale.metrics.Meter; +import com.codahale.metrics.Timer; +import org.apache.cassandra.service.accord.AccordService; + +import static java.util.concurrent.TimeUnit.MICROSECONDS; +import static org.apache.cassandra.metrics.CassandraMetricsRegistry.Metrics; + +public class AccordMetrics +{ + public final static AccordMetrics readMetrics = new AccordMetrics("ro"); + public final static AccordMetrics writeMetrics = new AccordMetrics("rw"); + + /** + * The time between start on the coordinator and commit on this replica. + */ + public final Timer commitLatency; + + /** + * The time between start on the coordinator and execution on this replica. + */ + public final Timer executeLatency; + + /** + * The time between start on the coordinator and application on this replica. + */ + public final Timer applyLatency; + + /** + * Duration of applying changes. + */ + public final Timer applyDuration; + + /** + * The number of dependencies of the transaction on this replica. + */ + public final Histogram deps; + + public final Meter progressLogSize; + + /** + * The number of dependencies of the transaction. + */ + public final Histogram coordinatorDeps; + + /** + * The number of fast path transactions executed on this coordinator. + */ + public final Meter coordinatorFastPathTrx; + + /** + * The number of slow path transactions executed on this coordinator. + */ + public final Meter coordinatorSlowPathTrx; + + /** + * The number of preempted transactions on this coordinator. + */ + public final Meter coordinatorPreemptedTrx; + + /** + * The number of timed out transactions on this coordinator. + */ + public final Meter coordinatorTimedoutTrx; Review Comment: Wait, after looking at this again, what is the difference between the timeout and preempted metrics here and the ones in `AccordClientRequestMetrics` recorded in `AccordService` and split into read/write? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

