Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22383

Use ProcessClock instead of hrtime_t, which cannot really wrap (and hence can remove the extra checks)

    XMLWordPrintable

Details

    Description

      See comments on http://review.couchbase.org/#/c/71572/3/src/vbucket.cc@967 - we unnecessarily check that hrtime_t could go backwards, which isn't possible if we use ProcessClock:

      void VBucket::updateBGStats(const hrtime_t init,
                                  const hrtime_t start,
                                  const hrtime_t stop) {
          if (stop >= start && start >= init) {
          ....
      

      Should replace uses of hrtime_t here with ProcessClock (when we are measuring the duration of something in a single thread).

      Attachments

        For Gerrit Dashboard: MB-22383
        # Subject Branch Project Status CR V

        Activity

          People

            james.harrison James Harrison (Inactive)
            manu Manu Dhundi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty