docs: public final synchronized void endProcedure(boolean aborted, boolean failed, SingleCallStatsToken statsToken) {
          if (aborted) {
              m_procStatsData.m_abortCount++;
          }
          if (failed) {
              m_procStatsData.m_failureCount++;
          }
          m_procStatsData.m_invocations++;
  
          // this means additional stats were not recorded
          if (!statsToken.samplingProcedure()) {
              return;
          }
  
          // This is a sampled invocation.
          // Update timings and size statistics.
          final long endTime = System.nanoTime();
          final long duration = endTime - statsToken.startTimeNanos;
          if (duration < 0) {
              if (Math.abs(duration) > 1000000000) {
                  log.info("Procedure: " + m_procName +
                           " recorded a negative execution time larger than one second: " + duration);
              }
              return;
          }
  
          m_procStatsData.m_timedInvocations++;
          // sampled timings
          m_procStatsData.m_totalTimedExecutionTime += duration;
          m_procStatsData.m_minExecutionTime = Math.min(duration, m_procStatsData.m_minExecutionTime);
          m_procStatsData.m_maxExecutionTime = Math.max(duration, m_procStatsData.m_maxExecutionTime);
          m_procStatsData.m_incrMinExecutionTime = Math.min(duration, m_procStatsData.m_incrMinExecutionTime);
          m_procStatsData.m_incrMaxExecutionTime = Math.max(duration, m_procStatsData.m_incrMaxExecutionTime);
  
          m_procStatsData.m_totalResultSize += statsToken.resultSize;
          m_procStatsData.m_minResultSize = Math.min(statsToken.resultSize, m_procStatsData.m_minResultSize);
          m_procStatsData.m_maxResultSize = Math.max(statsToken.resultSize, m_procStatsData.m_maxResultSize);
          m_procStatsData.m_incrMinResultSize = Math.min(statsToken.resultSize, m_procStatsData.m_incrMinResultSize);
          m_procStatsData.m_incrMaxResultSize = Math.max(statsToken.resultSize, m_procStatsData.m_incrMaxResultSize);
  
          m_procStatsData.m_totalParameterSetSize += statsToken.parameterSetSize;
          m_procStatsData.m_minParameterSetSize = Math.min(statsToken.parameterSetSize, m_procStatsData.m_minParameterSetSize);
          m_procStatsData.m_maxParameterSetSize = Math.max(statsToken.parameterSetSize, m_procStatsData.m_maxParameterSetSize);
          m_procStatsData.m_incrMinParameterSetSize = Math.min(statsToken.parameterSetSize, m_procStatsData.m_incrMinParameterSetSize);
          m_procStatsData.m_incrMaxParameterSetSize = Math.max(statsToken.parameterSetSize, m_procStatsData.m_incrMaxParameterSetSize);
  
          // stop here if no statements
          if (statsToken.stmtStats == null) {
              return;
          }
  
          for (SingleCallStatsToken.PerStmtStats pss : statsToken.stmtStats) {
              long stmtDuration = 0;
              int stmtResultSize = 0;
              int stmtParameterSetSize = 0;
              if (pss.measurements != null) {
                  stmtDuration = pss.measurements.stmtDuration;
                  stmtResultSize = pss.measurements.stmtResultSize;
                  stmtParameterSetSize = pss.measurements.stmtParameterSetSize;
              }
  
              endFragment(pss.stmtName,
                          pss.isCoordinatorTask,
                          pss.stmtFailed,
                          pss.measurements != null,
                          stmtDuration,
                          stmtResultSize,
                          stmtParameterSetSize);
          }
      }