Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67959

Provide simple interface to statistics for use by CE

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • QO 2022-07-25, QO 2022-08-08, QO 2022-08-22

      The goal of this ticket is to bootstrap a method for CE to be able to get stats. The specific design details such as naming should be discussed with Timour, but for now a Collection object should provide an interface class to the stats collection.

       

      class StatisticsInterface 
      {
          // Returns the current document count for the collection
          size_t currentDocCount();
       
          // Returns the statistics object associated with a path
          Statistics getStatistics(std::string key, boost::optional<Collation> collation);
      }
       
      

      The interface class gets the number of documents in the collection at the time of creation and returns it from currentDocCount.

      This interface class loads each stat on demand on the first call to getStatistics for a given path. Subsequent calls should return the same stats object, even if the underlying collection changes. Each interface class should have its own cache at this time.

      See the design doc for information on storage and indexing.

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            joel.redman@mongodb.com Joel Redman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: