Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11742

Find a better way to interact with stats using the Metrics Monitor in the cppsuite

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Test CPPsuite
    • 5
    • StorEng - Defined Pipeline

      In order to make the Metrics Monitor interact with a given stat, there is a lot of overhead to make it possible.
      For instance, if we take the example of WT_STAT_CONN_CACHE_HS_INSERT, we had to create a variable called CACHE_HS_INSERT in the cpp suite and map it to WT_STAT_CONN_CACHE_HS_INSERT:

      $ grep -rn "CACHE_HS_INSERT" *
      src/common/constants.cpp:42:const std::string CACHE_HS_INSERT = "cache_hs_insert";
      src/common/constants.h:45:extern const std::string CACHE_HS_INSERT;
      src/component/metrics_monitor.cpp:56:    if (name == CACHE_HS_INSERT)
      src/component/metrics_monitor.cpp:57:        return (WT_STAT_CONN_CACHE_HS_INSERT);
      src/component/metrics_monitor.cpp:96:        stat_config.reset(_config->get_subconfig(CACHE_HS_INSERT));
      src/component/metrics_monitor.cpp:98:          new statistics(*stat_config, CACHE_HS_INSERT, get_stat_field(CACHE_HS_INSERT))));
      

      Then we can finally use it in a test configuration as shown below:

      metrics_monitor=
      (
          cache_hs_insert=
          (
              max=10,
              max=100000000,
              postrun=true,
              save=true,
          ),
      

      This is too much work and not viable in the long term. We cannot map each existing stat unless it is done automatically. This ticket should find a better way to monitor existing WT stats from the cppsuite.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: