diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5215361a1..a003ad818f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,7 +176,7 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: CI-${{ github.head_ref }}.${{ github.sha }} + name: CI-${{ github.sha }} path: | /tmp/ceresdb-stdout.log /tmp/ceresmeta.log @@ -250,7 +250,7 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: sdk-test-${{ github.head_ref }}.${{ github.sha }} + name: sdk-test-${{ github.sha }} path: | /tmp/ceresdb-stdout.log diff --git a/analytic_engine/src/instance/write.rs b/analytic_engine/src/instance/write.rs index e52a88f9c5..f295445c4f 100644 --- a/analytic_engine/src/instance/write.rs +++ b/analytic_engine/src/instance/write.rs @@ -468,9 +468,10 @@ impl<'a> Writer<'a> { table_data.set_last_sequence(sequence); // Collect metrics. + let num_columns = row_group.schema().num_columns(); table_data .metrics - .on_write_request_done(row_group.num_rows()); + .on_write_request_done(row_group.num_rows(), num_columns); Ok(()) } diff --git a/analytic_engine/src/table/metrics.rs b/analytic_engine/src/table/metrics.rs index aad533b491..9e35b54659 100644 --- a/analytic_engine/src/table/metrics.rs +++ b/analytic_engine/src/table/metrics.rs @@ -48,6 +48,12 @@ lazy_static! { ) .unwrap(); + static ref TABLE_WRITE_FIELDS_COUNTER: IntCounter = register_int_counter!( + "table_write_fields_counter", + "Fields counter of table write" + ) + .unwrap(); + static ref TABLE_READ_REQUEST_COUNTER: IntCounter = register_int_counter!( "table_read_request_counter", "Read request counter of table" @@ -208,8 +214,9 @@ impl Metrics { } #[inline] - pub fn on_write_request_done(&self, num_rows: usize) { + pub fn on_write_request_done(&self, num_rows: usize, num_columns: usize) { TABLE_WRITE_BATCH_HISTOGRAM.observe(num_rows as f64); + TABLE_WRITE_FIELDS_COUNTER.inc_by((num_columns * num_rows) as u64); } #[inline]