Skip to content

Log SQL counts from save pipeline step

Marius Bobin requested to merge ci_pipeline_logger_sql into master

What does this MR do and why?

Related to #346246 (closed)

Screenshots or screen recordings

Adds the following entries to the pipeline logger data:

{
  "pipeline_save_duration_s": {
    "count": 1,
    "min": 6.0154480000492185,
    "max": 6.0154480000492185,
    "avg": 6.0154480000492185
  },
  "pipeline_save_db_count": {
    "count": 1,
    "min": 2520,
    "max": 2520,
    "avg": 2520
  },
  "pipeline_save_db_write_count": {
    "count": 1,
    "min": 1865,
    "max": 1865,
    "avg": 1865
  },
  "pipeline_save_db_primary_count": {
    "count": 1,
    "min": 2520,
    "max": 2520,
    "avg": 2520
  },
  "pipeline_save_db_primary_duration_s": {
    "count": 1,
    "min": 11.396,
    "max": 11.396,
    "avg": 11.396
  }
}
Here are all of the keys that it could log
  "pipeline_save_duration_s": {
    "count": 1,
    "min": 5.195619000005536,
    "max": 5.195619000005536,
    "avg": 5.195619000005536
  },
  "pipeline_save_db_count": {
    "count": 1,
    "min": 1008,
    "max": 1008,
    "avg": 1008
  },
  "pipeline_save_db_write_count": {
    "count": 1,
    "min": 746,
    "max": 746,
    "avg": 746
  },
  "pipeline_save_db_cached_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_replica_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_primary_count": {
    "count": 1,
    "min": 1008,
    "max": 1008,
    "avg": 1008
  },
  "pipeline_save_db_replica_cached_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_primary_cached_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_replica_wal_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_primary_wal_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_replica_wal_cached_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_primary_wal_cached_count": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_replica_duration_s": {
    "count": 1,
    "min": 0,
    "max": 0,
    "avg": 0
  },
  "pipeline_save_db_primary_duration_s": {
    "count": 1,
    "min": 4.672,
    "max": 4.672,
    "avg": 4.672
  },

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marius Bobin

Merge request reports

Loading