Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37187

hashicorp_key_management_plugin.cc uses expensive clock() call for no good reason

    XMLWordPrintable

Details

    • Related to performance

    Description

      As shown in MDEV-12345, frequent calls to clock() are prohibitively expensive.
      But they are used in hashicorp plugin code, in performance critical path, for no good reason.
      We do not want to measure CPU usage by thread or process, we want to measure time differences.

      C++11 has easy portable ways around it

      auto _now = std::chrono::high_resolution_clock::now();
       
      auto time_diff_in_ms =  auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(_now - _then);
      

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.