Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust metrics precision #12756

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/util/metric/v2/fileservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var (
Subsystem: "fs",
Name: "s3_io_duration_seconds",
Help: "Bucketed histogram of s3 io duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
S3WriteIODurationHistogram = s3IODurationHistogram.WithLabelValues("write")
S3ReadIODurationHistogram = s3IODurationHistogram.WithLabelValues("read")
Expand All @@ -87,7 +87,7 @@ var (
Subsystem: "fs",
Name: "s3_conn_duration_seconds",
Help: "Bucketed histogram of s3 get conn duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
S3GetConnDurationHistogram = s3ConnDurationHistogram.WithLabelValues("get-conn")
S3DNSResolveDurationHistogram = s3ConnDurationHistogram.WithLabelValues("dns-resolve")
Expand All @@ -111,7 +111,7 @@ var (
Subsystem: "fs",
Name: "local_io_duration_seconds",
Help: "Bucketed histogram of local io duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
LocalWriteIODurationHistogram = localIODurationHistogram.WithLabelValues("write")
LocalReadIODurationHistogram = localIODurationHistogram.WithLabelValues("read")
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/metric/v2/hakeeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (
Subsystem: "heartbeat_send",
Name: "duration_seconds",
Help: "hakeeper heartbeat send durations",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})

HeartbeatFailureCounter = prometheus.NewCounterVec(
Expand All @@ -40,7 +40,7 @@ var (
Subsystem: "heartbeat_recv",
Name: "duration_seconds",
Help: "hakeeper heartbeat recv durations",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})

HeartbeatRecvFailureCounter = prometheus.NewCounterVec(
Expand Down
10 changes: 5 additions & 5 deletions pkg/util/metric/v2/logtail.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var (
Subsystem: "logtail",
Name: "apply_duration_seconds",
Help: "Bucketed histogram of apply log tail into mem-table duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"step"})
LogTailApplyDurationHistogram = logTailApplyDurationHistogram.WithLabelValues("apply")
LogTailApplyLatencyDurationHistogram = logTailApplyDurationHistogram.WithLabelValues("apply-latency")
Expand All @@ -70,7 +70,7 @@ var (
Subsystem: "logtail",
Name: "append_duration_seconds",
Help: "Bucketed histogram of append log tail into logservice duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
})

logTailSendDurationHistogram = prometheus.NewHistogramVec(
Expand All @@ -79,7 +79,7 @@ var (
Subsystem: "logtail",
Name: "send_duration_seconds",
Help: "Bucketed histogram of send logtail log duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 10),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 10),
}, []string{"step"})
LogtailSendTotalHistogram = logTailSendDurationHistogram.WithLabelValues("total")
LogtailSendLatencyHistogram = logTailSendDurationHistogram.WithLabelValues("latency")
Expand All @@ -91,7 +91,7 @@ var (
Subsystem: "logtail",
Name: "load_checkpoint_duration_seconds",
Help: "Bucketed histogram of load check point duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
})

LogTailCollectDurationHistogram = prometheus.NewHistogram(
Expand All @@ -100,7 +100,7 @@ var (
Subsystem: "logtail",
Name: "collect_duration_seconds",
Help: "Bucketed histogram of logtail collecting duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
})
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/util/metric/v2/morpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var (
Subsystem: "rpc",
Name: "backend_connect_duration_seconds",
Help: "Bucketed histogram of write data into socket duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"name"})

rpcWriteDurationHistogram = prometheus.NewHistogramVec(
Expand All @@ -110,7 +110,7 @@ var (
Subsystem: "rpc",
Name: "write_duration_seconds",
Help: "Bucketed histogram of write data into socket duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"name", "side"})

rpcWriteLatencyDurationHistogram = prometheus.NewHistogramVec(
Expand All @@ -119,7 +119,7 @@ var (
Subsystem: "rpc",
Name: "write_latency_duration_seconds",
Help: "Bucketed histogram of write latency duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"name", "side"})

rpcBackendDoneDurationHistogram = prometheus.NewHistogramVec(
Expand All @@ -128,7 +128,7 @@ var (
Subsystem: "rpc",
Name: "backend_done_duration_seconds",
Help: "Bucketed histogram of request done duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"name"})
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/metric/v2/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
Subsystem: "task",
Name: "short_duration_seconds",
Help: "Bucketed histogram of short tn task execute duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})

TaskFlushTableTailDurationHistogram = taskShortDurationHistogram.WithLabelValues("flush_table_tail")
Expand Down
18 changes: 9 additions & 9 deletions pkg/util/metric/v2/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ var (
Subsystem: "txn",
Name: "commit_duration_seconds",
Help: "Bucketed histogram of txn commit duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnCNCommitDurationHistogram = txnCommitDurationHistogram.WithLabelValues("cn")
TxnCNSendCommitDurationHistogram = txnCommitDurationHistogram.WithLabelValues("cn-send")
Expand All @@ -123,7 +123,7 @@ var (
Subsystem: "txn",
Name: "life_duration_seconds",
Help: "Bucketed histogram of txn life cycle duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
})

TxnLifeCycleStatementsTotalHistogram = prometheus.NewHistogram(
Expand All @@ -141,7 +141,7 @@ var (
Subsystem: "txn",
Name: "create_duration_seconds",
Help: "Bucketed histogram of txn create txn duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnCreateTotalDurationHistogram = txnCreateDurationHistogram.WithLabelValues("total")
TxnDetermineSnapshotDurationHistogram = txnCreateDurationHistogram.WithLabelValues("determine-snapshot")
Expand All @@ -153,7 +153,7 @@ var (
Subsystem: "txn",
Name: "statement_duration_seconds",
Help: "Bucketed histogram of txn statement duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnStatementBuildPlanDurationHistogram = txnStatementDurationHistogram.WithLabelValues("build-plan")
TxnStatementExecuteDurationHistogram = txnStatementDurationHistogram.WithLabelValues("execute")
Expand All @@ -166,7 +166,7 @@ var (
Subsystem: "txn",
Name: "lock_duration_seconds",
Help: "Bucketed histogram of acquire lock duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnAcquireLockDurationHistogram = txnLockDurationHistogram.WithLabelValues("acquire")
TxnAcquireLockWaitDurationHistogram = txnLockDurationHistogram.WithLabelValues("acquire-wait")
Expand All @@ -178,7 +178,7 @@ var (
Subsystem: "txn",
Name: "unlock_duration_seconds",
Help: "Bucketed histogram of release lock duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnUnlockDurationHistogram = txnUnlockDurationHistogram.WithLabelValues("total")
TxnUnlockBtreeGetLockDurationHistogram = txnUnlockDurationHistogram.WithLabelValues("btree-get-lock")
Expand All @@ -199,7 +199,7 @@ var (
Subsystem: "txn",
Name: "ranges_duration_seconds",
Help: "Bucketed histogram of txn table ranges duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
})

TxnTableRangeSizeHistogram = prometheus.NewHistogram(
Expand All @@ -217,7 +217,7 @@ var (
Subsystem: "txn",
Name: "tn_side_duration_seconds",
Help: "Bucketed histogram of txn duration on tn side.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"step"})

TxnOnPrepareWALDurationHistogram = txnTNSideDurationHistogram.WithLabelValues("on_prepare_wal")
Expand All @@ -231,7 +231,7 @@ var (
Subsystem: "txn",
Name: "mpool_duration_seconds",
Help: "Bucketed histogram of txn mpool duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2.0, 20),
Buckets: prometheus.ExponentialBuckets(0.00001, 2.0, 20),
}, []string{"type"})
TxnMpoolNewDurationHistogram = txnMpoolDurationHistogram.WithLabelValues("new")
TxnMpoolAllocDurationHistogram = txnMpoolDurationHistogram.WithLabelValues("alloc")
Expand Down