mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-03 03:41:53 +08:00
Added a metric into ProxyMetrics to expose current commit batching window, which can be used as an indicator of the load on the proxy.
This commit is contained in:
parent
4dd3fda285
commit
15ac27ef94
@ -65,6 +65,7 @@ struct ProxyStats {
|
||||
Version lastCommitVersionAssigned;
|
||||
double transactionRateAllowed, batchTransactionRateAllowed;
|
||||
double transactionLimit, batchTransactionLimit;
|
||||
double commitBatchInterval;
|
||||
// how much of the GRV requests queue was processed in one attempt to hand out read version.
|
||||
double percentageOfDefaultGRVQueueProcessed;
|
||||
double percentageOfBatchGRVQueueProcessed;
|
||||
@ -122,6 +123,7 @@ struct ProxyStats {
|
||||
[this]() { return this->percentageOfDefaultGRVQueueProcessed; });
|
||||
specialCounter(cc, "PercentageOfBatchGRVQueueProcessed",
|
||||
[this]() { return this->percentageOfBatchGRVQueueProcessed; });
|
||||
specialCounter(cc, "DynamicCommitBatchWindow", [this]() { return this->commitBatchInterval; });
|
||||
logger = traceCounters("ProxyMetrics", id, SERVER_KNOBS->WORKER_LOGGING_INTERVAL, &cc, "ProxyMetrics");
|
||||
}
|
||||
};
|
||||
@ -1253,6 +1255,7 @@ ACTOR Future<Void> commitBatch(
|
||||
std::min(SERVER_KNOBS->COMMIT_TRANSACTION_BATCH_INTERVAL_MAX,
|
||||
target_latency * SERVER_KNOBS->COMMIT_TRANSACTION_BATCH_INTERVAL_SMOOTHER_ALPHA + self->commitBatchInterval * (1-SERVER_KNOBS->COMMIT_TRANSACTION_BATCH_INTERVAL_SMOOTHER_ALPHA)));
|
||||
|
||||
self->stats.commitBatchInterval = self->commitBatchInterval;
|
||||
|
||||
self->commitBatchesMemBytesCount -= currentBatchMemBytesCount;
|
||||
ASSERT_ABORT(self->commitBatchesMemBytesCount >= 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user