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

Replace hrtime2text (common.h) with Couchbase::hrtime2text; convert to std::chrono

    XMLWordPrintable

Details

    Description

      engines/ep/src/common.h has a function named hrtime2text() which converts a duration in nanoseconds to a human-readable string.

      However, we also have an equivalent function in platform/timeutils.h - hrtime2text which does the same thing.

      There is no point in having two equivalent functions - we should replace the ep-engine specific one with the one form platform, and update all uses to the platform one.

      Additionally, we should also migrate the function over to use the C++11 <chrono> library for the time unit as this is type-safe and allows easier conversion to other durations.

      Attachments

        Activity

          People

            eugen.virtan Eugen Virtan (Inactive)
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty