Skip to content

Commit be3da82

Browse files
committed
use dots in stat name
1 parent d246d20 commit be3da82

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

pkg/dataobj/internal/dataset/read_stats.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@ import (
77
// xcap statistics for dataset reader operations.
88
var (
99
// Column statistics
10-
StatPrimaryColumns = xcap.NewStatisticInt64("primary_columns", xcap.AggregationTypeSum)
11-
StatSecondaryColumns = xcap.NewStatisticInt64("secondary_columns", xcap.AggregationTypeSum)
10+
StatPrimaryColumns = xcap.NewStatisticInt64("primary.columns", xcap.AggregationTypeSum)
11+
StatSecondaryColumns = xcap.NewStatisticInt64("secondary.columns", xcap.AggregationTypeSum)
1212

1313
// Page statistics
14-
StatPrimaryColumnPages = xcap.NewStatisticInt64("primary_column_pages", xcap.AggregationTypeSum)
15-
StatSecondaryColumnPages = xcap.NewStatisticInt64("secondary_column_pages", xcap.AggregationTypeSum)
14+
StatPrimaryColumnPages = xcap.NewStatisticInt64("primary.column.pages", xcap.AggregationTypeSum)
15+
StatSecondaryColumnPages = xcap.NewStatisticInt64("secondary.column.pages", xcap.AggregationTypeSum)
1616

1717
// Row statistics
18-
StatMaxRows = xcap.NewStatisticInt64("max_rows", xcap.AggregationTypeSum)
19-
StatRowsAfterPruning = xcap.NewStatisticInt64("rows_after_pruning", xcap.AggregationTypeSum)
20-
StatPrimaryRowsRead = xcap.NewStatisticInt64("primary_rows_read", xcap.AggregationTypeSum)
21-
StatSecondaryRowsRead = xcap.NewStatisticInt64("secondary_rows_read", xcap.AggregationTypeSum)
22-
StatPrimaryRowBytes = xcap.NewStatisticInt64("primary_row_bytes_read", xcap.AggregationTypeSum)
23-
StatSecondaryRowBytes = xcap.NewStatisticInt64("secondary_row_bytes_read", xcap.AggregationTypeSum)
18+
StatMaxRows = xcap.NewStatisticInt64("row.max", xcap.AggregationTypeSum)
19+
StatRowsAfterPruning = xcap.NewStatisticInt64("rows.after.pruning", xcap.AggregationTypeSum)
20+
StatPrimaryRowsRead = xcap.NewStatisticInt64("primary.rows.read", xcap.AggregationTypeSum)
21+
StatSecondaryRowsRead = xcap.NewStatisticInt64("secondary.rows.read", xcap.AggregationTypeSum)
22+
StatPrimaryRowBytes = xcap.NewStatisticInt64("primary.row.read.bytes", xcap.AggregationTypeSum)
23+
StatSecondaryRowBytes = xcap.NewStatisticInt64("secondary.row.read.bytes", xcap.AggregationTypeSum)
2424

2525
// Download/Page scan statistics
26-
StatPagesScanned = xcap.NewStatisticInt64("pages_scanned", xcap.AggregationTypeSum)
27-
StatPagesFoundInCache = xcap.NewStatisticInt64("pages_found_in_cache", xcap.AggregationTypeSum)
28-
StatBatchDownloadRequests = xcap.NewStatisticInt64("batch_download_requests", xcap.AggregationTypeSum)
29-
StatPageDownloadTime = xcap.NewStatisticInt64("page_download_time_ns", xcap.AggregationTypeSum)
26+
StatPagesScanned = xcap.NewStatisticInt64("pages.scanned", xcap.AggregationTypeSum)
27+
StatPagesFoundInCache = xcap.NewStatisticInt64("pages.cache.hit", xcap.AggregationTypeSum)
28+
StatPageDownloadRequests = xcap.NewStatisticInt64("pages.download.requests", xcap.AggregationTypeSum)
29+
StatPageDownloadTime = xcap.NewStatisticInt64("pages.download.duration.ns", xcap.AggregationTypeSum)
3030

3131
// Page download byte statistics
32-
StatPrimaryColumnPagesDownloaded = xcap.NewStatisticInt64("primary_column_pages_downloaded", xcap.AggregationTypeSum)
33-
StatSecondaryColumnPagesDownloaded = xcap.NewStatisticInt64("secondary_column_pages_downloaded", xcap.AggregationTypeSum)
34-
StatPrimaryColumnBytes = xcap.NewStatisticInt64("primary_column_bytes", xcap.AggregationTypeSum)
35-
StatSecondaryColumnBytes = xcap.NewStatisticInt64("secondary_column_bytes", xcap.AggregationTypeSum)
36-
StatPrimaryColumnUncompressedBytes = xcap.NewStatisticInt64("primary_column_uncompressed_bytes", xcap.AggregationTypeSum)
37-
StatSecondaryColumnUncompressedBytes = xcap.NewStatisticInt64("secondary_column_uncompressed_bytes", xcap.AggregationTypeSum)
32+
StatPrimaryPagesDownloaded = xcap.NewStatisticInt64("primary.pages.downloaded", xcap.AggregationTypeSum)
33+
StatSecondaryPagesDownloaded = xcap.NewStatisticInt64("secondary.pages.downloaded", xcap.AggregationTypeSum)
34+
StatPrimaryColumnBytes = xcap.NewStatisticInt64("primary.pages.compressed.bytes", xcap.AggregationTypeSum)
35+
StatSecondaryColumnBytes = xcap.NewStatisticInt64("secondary.pages.compressed.bytes", xcap.AggregationTypeSum)
36+
StatPrimaryColumnUncompressedBytes = xcap.NewStatisticInt64("primary.pages.uncompressed.bytes", xcap.AggregationTypeSum)
37+
StatSecondaryColumnUncompressedBytes = xcap.NewStatisticInt64("secondary.pages.uncompressed.bytes", xcap.AggregationTypeSum)
3838

3939
// Read operation statistics
40-
StatReadCalls = xcap.NewStatisticInt64("read_calls", xcap.AggregationTypeSum)
40+
StatReadCalls = xcap.NewStatisticInt64("read.calls", xcap.AggregationTypeSum)
4141
)

pkg/dataobj/internal/dataset/reader_downloader.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ func (dl *readerDownloader) downloadBatch(ctx context.Context, requestor *reader
232232
if region := xcap.RegionFromContext(ctx); region != nil {
233233
for _, page := range batch {
234234
if page.column.primary {
235-
region.Record(StatPrimaryColumnPagesDownloaded.Observe(1))
235+
region.Record(StatPrimaryPagesDownloaded.Observe(1))
236236
region.Record(StatPrimaryColumnBytes.Observe(int64(page.inner.PageDesc().CompressedSize)))
237237
region.Record(StatPrimaryColumnUncompressedBytes.Observe(int64(page.inner.PageDesc().UncompressedSize)))
238238
} else {
239-
region.Record(StatSecondaryColumnPagesDownloaded.Observe(1))
239+
region.Record(StatSecondaryPagesDownloaded.Observe(1))
240240
region.Record(StatSecondaryColumnBytes.Observe(int64(page.inner.PageDesc().CompressedSize)))
241241
region.Record(StatSecondaryColumnUncompressedBytes.Observe(int64(page.inner.PageDesc().UncompressedSize)))
242242
}
@@ -595,7 +595,7 @@ func (page *readerPage) ReadPage(ctx context.Context) (PageData, error) {
595595
return page.data, nil
596596
}
597597

598-
region.Record(StatBatchDownloadRequests.Observe(1))
598+
region.Record(StatPageDownloadRequests.Observe(1))
599599
if err := page.column.dl.downloadBatch(ctx, page); err != nil {
600600
return nil, err
601601
}

0 commit comments

Comments
 (0)