Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi committed Oct 29, 2024
1 parent 4990fa7 commit cc9fa68
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
37 changes: 34 additions & 3 deletions docs/content/maintenance/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ Below is lists of Paimon built-in metrics. They are summarized into types of sca
<td>Gauge</td>
<td>Number of buckets written in the last commit.</td>
</tr>
<tr>
<td>lastCompactionInputFileSize</td>
<td>Gauge</td>
<td>Total size of the input files for the last compaction.</td>
</tr>
<tr>
<td>lastCompactionOutputFileSize</td>
<td>Gauge</td>
<td>Total size of the output files for the last compaction.</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -232,23 +242,44 @@ Below is lists of Paimon built-in metrics. They are summarized into types of sca
<tr>
<td>maxLevel0FileCount</td>
<td>Gauge</td>
<td>The maximum number of level 0 files currently handled by this writer. This value will become larger if asynchronous compaction cannot be done in time.</td>
<td>The maximum number of level 0 files currently handled by this task. This value will become larger if asynchronous compaction cannot be done in time.</td>
</tr>
<tr>
<td>avgLevel0FileCount</td>
<td>Gauge</td>
<td>The average number of level 0 files currently handled by this writer. This value will become larger if asynchronous compaction cannot be done in time.</td>
<td>The average number of level 0 files currently handled by this task. This value will become larger if asynchronous compaction cannot be done in time.</td>
</tr>
<tr>
<td>compactionThreadBusy</td>
<td>Gauge</td>
<td>The maximum business of compaction threads in this parallelism. Currently, there is only one compaction thread in each parallelism, so value of business ranges from 0 (idle) to 100 (compaction running all the time).</td>
<td>The maximum business of compaction threads in this task. Currently, there is only one compaction thread in each parallelism, so value of business ranges from 0 (idle) to 100 (compaction running all the time).</td>
</tr>
<tr>
<td>avgCompactionTime</td>
<td>Gauge</td>
<td>The average runtime of compaction threads, calculated based on recorded compaction time data in milliseconds. The value represents the average duration of compaction operations. Higher values indicate longer average compaction times, which may suggest the need for performance optimization.</td>
</tr>
<tr>
<td>maxCompactionInputSize</td>
<td>Gauge</td>
<td>The maximum input file size for this task's compaction.</td>
</tr>
<tr>
<td>avgCompactionInputSize/td>
<td>Gauge</td>
<td>The average input file size for this task's compaction.</td>
</tr>
<tr>
<td>maxCompactionOutputSize</td>
<td>Gauge</td>
<td>The maximum output file size for this task's compaction.</td>
</tr>
<tr>
<td>avgCompactionOutputSize</td>
<td>Gauge</td>
<td>The average output file size for this task's compaction.</td>
</tr>

</tbody>
</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public MetricGroup getMetricGroup() {
@VisibleForTesting static final String LAST_PARTITIONS_WRITTEN = "lastPartitionsWritten";
@VisibleForTesting static final String LAST_BUCKETS_WRITTEN = "lastBucketsWritten";

static final String LAST_REWRITE_INPUT_FILE_SIZE = "lastRewriteInputFileSize";
static final String LAST_REWRITE_OUTPUT_FILE_SIZE = "lastRewriteOutputFileSize";
static final String LAST_COMPACTION_INPUT_FILE_SIZE = "lastCompactionInputFileSize";
static final String LAST_COMPACTION_OUTPUT_FILE_SIZE = "lastCompactionOutputFileSize";

private void registerGenericCommitMetrics() {
metricGroup.gauge(
Expand Down Expand Up @@ -125,10 +125,10 @@ private void registerGenericCommitMetrics() {
LAST_CHANGELOG_RECORDS_COMMIT_COMPACTED,
() -> latestCommit == null ? 0L : latestCommit.getChangelogRecordsCompacted());
metricGroup.gauge(
LAST_REWRITE_INPUT_FILE_SIZE,
LAST_COMPACTION_INPUT_FILE_SIZE,
() -> latestCommit == null ? 0L : latestCommit.getRewriteInputFileSize());
metricGroup.gauge(
LAST_REWRITE_OUTPUT_FILE_SIZE,
LAST_COMPACTION_OUTPUT_FILE_SIZE,
() -> latestCommit == null ? 0L : latestCommit.getRewriteOutputFileSize());
}

Expand Down

0 comments on commit cc9fa68

Please sign in to comment.