Print the final summary report

@param totalTime Time spent running the TCK
354745
private void printResult(long totalTime) {
      // Platform
      summary.println("Running TCK on platform: " + platformDescription);
      summary.println();

      // Instantiator implementations
      summary.println("Instantiators used: ");
      summary.println("   Objenesis standard  : " + objenesisStandard.getInstantiatorOf(String.class).getClass().getName());
      summary.println("   Objenesis serializer: " + objenesisSerializer.getInstantiatorOf(String.class).getClass().getName());
      summary.println();

      Collection<String> candidateNames = new ArrayList<>();
      for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
         candidateNames.add(entry.getKey().getDescription());
      }

      int maxObjenesisWidth = "Objenesis serializer".length();
      int maxCandidateWidth = lengthOfLongestStringIn(candidateNames);

      // Strategy used
      summary.print(pad("", maxCandidateWidth) + ' ');
      summary.print(pad("Objenesis standard", maxObjenesisWidth) + ' ');
      summary.print(pad("Objenesis serializer", maxObjenesisWidth));
      summary.println();

      List<Result> exceptions = new ArrayList<>();

      // Candidates
      for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
         summary.print(pad(entry.getKey().getDescription(), maxCandidateWidth) + ' ');

         Result standardResult = entry.getValue().get(Candidate.CandidateType.STANDARD);
         Result serializationResult = entry.getValue().get(Candidate.CandidateType.SERIALIZATION);

         if(standardResult == null && serializationResult == null) {
            continue;
         }

         if(standardResult == null) {
            summary.print(pad("N/A", maxObjenesisWidth) + " ");
         }
         else {
            summary.print(pad(standardResult.result ? "Y" : "n", maxObjenesisWidth) + " ");

            if(standardResult.exception != null) {
               exceptions.add(standardResult);
            }
         }

         if(serializationResult == null) {
            summary.print(pad("N/A", maxObjenesisWidth));
         }
         else {
            summary.print(pad(serializationResult.result ? "Y" : "n", maxObjenesisWidth));

            if(serializationResult.exception != null) {
               exceptions.add(serializationResult);
            }
         }

         summary.println();
      }

      summary.println();

      // Final
      if(errorCount != 0) {

         for(Result element : exceptions) {
            log.println("--- Candidate '" + element.candidate.getDescription() + "', Type '" + element.type + "' ---");
            element.exception.printStackTrace(log);
            log.println();
         }

         log.println();

         summary.println("--- FAILED: " + errorCount + " error(s) occurred ---");
      }
      else {
         summary.println("--- SUCCESSFUL: TCK tests passed without errors in " + totalTime + " ms");
      }

      summary.println();
   }
331690
public synchronized void printResults() throws Exception {
        printHeading("Transaction Results");

        BenchmarkCallback.printAllResults();

        ClientStats stats = fullStatsContext.fetch().getStats();

        // 3. Performance statistics
        printHeading("Client Workload Statistics");

        System.out.printf("Average throughput:            %,9d txns/sec\n", stats.getTxnThroughput());
        // cast stats.getAverateLatency from long to double
        System.out.printf("Average latency:               %,9.2f ms\n", stats.getAverageLatency());
        //System.out.printf("Average latency:               %,9d ms\n", stats.getAverageLatency());
        System.out.printf("95th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.95));
        System.out.printf("99th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.99));

        printHeading("System Server Statistics");

        // cast stats.getAverageInternalLatency from long to double
        System.out.printf("Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());
        //System.out.printf("Reported Internal Avg Latency: %,9d ms\n", stats.getAverageInternalLatency());

        // 4. Write stats to file if requested
        client.writeSummaryCSV(stats, config.statsfile);
    }
1126571
@SuppressWarnings("deprecation")
	public final void printStatisticsHTML(Appendable out) throws IOException, E {
		// Get the data
		boolean myIsClosed;
		synchronized(poolLock) {
			myIsClosed = isClosed;
		}
		// Don't write while holding the lock to avoid possible blocking
		int numConnections;
		boolean[] isConnecteds;
		long[] createTimes;
		long[] connectCounts;
		long[] useCounts;
		long[] totalTimes;
		boolean[] isBusies;
		long[] startTimes;
		long[] releaseTimes;
		Throwable[] allocateStackTraces;
		synchronized(poolLock) {
			numConnections = allConnections.size();
			isConnecteds = new boolean[numConnections];
			createTimes = new long[numConnections];
			connectCounts = new long[numConnections];
			useCounts = new long[numConnections];
			totalTimes = new long[numConnections];
			isBusies = new boolean[numConnections];
			startTimes = new long[numConnections];
			releaseTimes = new long[numConnections];
			allocateStackTraces = new Throwable[numConnections];
			for(int c=0;c<numConnections;c++) {
				PooledConnection<C> pooledConnection = allConnections.get(c);
				isConnecteds[c] = pooledConnection.connection != null;
				createTimes[c] = pooledConnection.createTime;
				connectCounts[c] = pooledConnection.connectCount.get();
				useCounts[c] = pooledConnection.useCount.get();
				totalTimes[c] = pooledConnection.totalTime.get();
				isBusies[c] = busyConnections.contains(pooledConnection);
				startTimes[c] = pooledConnection.startTime;
				releaseTimes[c] = pooledConnection.releaseTime;
				allocateStackTraces[c] = pooledConnection.allocateStackTrace;
			}
		}
		long time = System.currentTimeMillis();
		long timeLen = time-startTime;

		// Print the stats
		out.append("<table style='border:1px;' cellspacing='0' cellpadding='2'>\n");
		printConnectionStats(out);
		out.append("  <tr><td>Max Connection Pool Size:</td><td>").append(Integer.toString(poolSize)).append("</td></tr>\n"
				+ "  <tr><td>Connection Clean Interval:</td><td>");
		com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(delayTime), out);
		out.append("</td></tr>\n"
				+ "  <tr><td>Max Idle Time:</td><td>");
		com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(maxIdleTime), out);
		out.append("</td></tr>\n"
				+ "  <tr><td>Max Connection Age:</td><td>");
		com.aoindustries.util.EncodingUtils.encodeHtml(maxConnectionAge==UNLIMITED_MAX_CONNECTION_AGE?"Unlimited":StringUtility.getDecimalTimeLengthString(maxConnectionAge), out);
		out.append("</td></tr>\n"
				+ "  <tr><td>Is Closed:</td><td>").append(Boolean.toString(myIsClosed)).append("</td></tr>\n"
				+ "</table>\n"
				+ "<br /><br />\n"
				+ "<table style='border:1px;' cellspacing='0' cellpadding='2'>\n"
				+ "  <tr><th colspan='11'><span style='font-size:large;'>Connections</span></th></tr>\n"
				+ "  <tr>\n"
				+ "    <th>Connection #</th>\n"
				+ "    <th>Is Connected</th>\n"
				+ "    <th>Conn Age</th>\n"
				+ "    <th>Conn Count</th>\n"
				+ "    <th>Use Count</th>\n"
				+ "    <th>Total Time</th>\n"
				+ "    <th>% of Time</th>\n"
				+ "    <th>State</th>\n"
				+ "    <th>State Time</th>\n"
				+ "    <th>Ave Trans Time</th>\n"
				+ "    <th>Stack Trace</th>\n"
				+ "  </tr>\n");

		int totalConnected = 0;
		long totalConnects = 0;
		long totalUses = 0;
		long totalTotalTime = 0;
		int totalBusy = 0;

		for(int c=0;c<numConnections;c++) {
			long connCount = connectCounts[c];
			boolean isConnected = isConnecteds[c];
			long useCount = useCounts[c];
			long totalTime = totalTimes[c];
			boolean isBusy = isBusies[c];
			if(isBusy) totalTime += time - startTimes[c];
			long stateTime = isBusy ? (time-startTimes[c]):(time-releaseTimes[c]);
			out.append("  <tr>\n"
					+ "    <td>").append(Integer.toString(c+1)).append("</td>\n"
					+ "    <td>").append(isConnected?"Yes":"No").append("</td>\n"
					+ "    <td>");
			if(isConnected) com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(time-createTimes[c]), out);
			else out.append("&#160;");
			out.append("    <td>").append(Long.toString(connCount)).append("</td>\n"
					+ "    <td>").append(Long.toString(useCount)).append("</td>\n"
					+ "    <td>");
			com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(totalTime), out);
			out.append("</td>\n"
					+ "    <td>").append(Float.toString(totalTime*100/(float)timeLen)).append("%</td>\n"
					+ "    <td>").append(isBusy?"In Use":isConnected?"Idle":"Closed").append("</td>\n"
					+ "    <td>");
			com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(stateTime), out);
			out.append("</td>\n"
					+ "    <td>").append(Long.toString(totalTime*1000/useCount)).append("&#181;s</td>\n"
					+ "    <td>");
			Throwable T = allocateStackTraces[c];
			if(T == null) out.append("&#160;");
			else {
				out.append("      <a href='#' onclick='var elem = document.getElementById(\"stack_").append(Integer.toString(c)).append("\").style; elem.visibility=(elem.visibility==\"visible\" ? \"hidden\" : \"visible\"); return false;'>Stack Trace</a>\n"
						+ "      <span id='stack_").append(Integer.toString(c)).append("' style='text-align:left; white-space:nowrap; position:absolute; visibility: hidden; z-index:").append(Integer.toString(c+1)).append("'>\n"
						+ "        <pre style='text-align:left; background-color:white; border: 2px solid; border-color: black;'>\n");
				ErrorPrinter.printStackTraces(T, out);
				out.append("        </pre>\n"
						+ "      </span>\n");
			}
			out.append("</td>\n"
					+ "  </tr>\n");

			// Update totals
			if(isConnected) totalConnected++;
			totalConnects+=connCount;
			totalUses+=useCount;
			totalTotalTime+=totalTime;
			if(isBusy) totalBusy++;
		}
		out.append("  <tr>\n"
				+ "    <td><b>Total</b></td>\n"
				+ "    <td>").append(Integer.toString(totalConnected)).append("</td>\n"
				+ "    <td>&#160;</td>\n"
				+ "    <td>").append(Long.toString(totalConnects)).append("</td>\n"
				+ "    <td>").append(Long.toString(totalUses)).append("</td>\n"
				+ "    <td>");
		com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(totalTotalTime), out);
		out.append("</td>\n"
				+ "    <td>").append(Float.toString(timeLen==0 ? 0 : (totalTotalTime*100/(float)timeLen))).append("%</td>\n"
				+ "    <td>").append(Integer.toString(totalBusy)).append("</td>\n"
				+ "    <td>");
		com.aoindustries.util.EncodingUtils.encodeHtml(StringUtility.getDecimalTimeLengthString(timeLen), out);
		out.append("</td>\n"
				+ "    <td>").append(Long.toString(totalUses==0 ? 0 : (totalTotalTime*1000/totalUses))).append("&#181;s</td>\n"
				+ "    <td>&#160;</td>\n"
				+ "  </tr>\n"
				+ "</table>\n");
	}
606718
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions,
        boolean quickPath
    ) throws IOException {

        if (!formattable.hasTimezone()) {
            throw new IllegalArgumentException(
                "Cannot extract timezone name from: " + formattable);
        }

        TZID tzid = formattable.getTimezone();

        if (tzid instanceof ZonalOffset) {
            return this.fallback.print(formattable, buffer, attributes, positions, quickPath);
        }

        String name;

        if (formattable instanceof UnixTime) {
            Timezone zone = Timezone.of(tzid);
            UnixTime ut = UnixTime.class.cast(formattable);

            name =
                zone.getDisplayName(
                    this.getStyle(zone.isDaylightSaving(ut)),
                    quickPath
                        ? this.locale
                        : attributes.get(Attributes.LANGUAGE, Locale.ROOT));
        } else {
            throw new IllegalArgumentException(
                "Cannot extract timezone name from: " + formattable);
        }

        int start = -1;
        int printed;

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        buffer.append(name);
        printed = name.length();

        if (
            (start != -1)
            && (printed > 0)
            && (positions != null)
        ) {
            positions.add(
                new ElementPosition(
                    TimezoneElement.TIMEZONE_ID,
                    start,
                    start + printed));
        }

        return printed;

    }
616249
def stats_printer(stats_queue):
  """"""
  proc_stats = [ProcessStats(i) for i in range(FLAGS.parallel)]
  print_time = start_time = time.time()
  width = 107

  running = True
  while running:
    print_time += 10

    while time.time() < print_time:
      try:
        s = stats_queue.get(True, print_time - time.time())
        if s is None:  # Signal to print and exit NOW!
          running = False
          break
        proc_stats[s.proc_id] = s
      except queue.Empty:
        pass

    replay_stats = ReplayStats()
    for s in proc_stats:
      replay_stats.merge(s.replay_stats)

    print((" Summary %0d secs " % (print_time - start_time)).center(width, "="))
    print(replay_stats)
    print(" Process stats ".center(width, "-"))
    print("\n".join(str(s) for s in proc_stats))
    print("=" * width)
1010855
def _charSummary(self, char_count, block_count=None):
        
        if not self._display['omit_summary']:
            if block_count is None:
                print('Total code points:', char_count)
            else:
                print('Total {0} code point{1} in {2} block{3}'.format(
                    char_count,
                    's' if char_count != 1 else '',
                    block_count,
                    's' if block_count != 1 else ''
                ))
801018
synchronized void printStats() {
        String line1 = String.format("CACHE STATS - Literals: Hits %d/%d (%.1f%%), Inserts %d Evictions %d\n",
                m_literalHits, m_literalQueries, (m_literalHits * 100.0) / m_literalQueries,
                m_literalInsertions, m_literalEvictions);
        String line2 = String.format("CACHE STATS - Plans:    Hits %d/%d (%.1f%%), Inserts %d Evictions %d\n",
                m_planHits, m_planQueries, (m_planHits * 100.0) /m_planQueries,
                m_planInsertions, m_planEvictions);

        System.out.print(line1 + line2);
        System.out.flush();

        // reset these
        m_literalHits = 0;
        m_literalQueries = 0;
        m_literalInsertions = 0;
        m_literalEvictions = 0;
        m_planHits = 0;
        m_planQueries = 0;
        m_planInsertions = 0;
        m_planEvictions = 0;
    }
634083
def _print_duration(self):
        ''''''
        duration = int(time.time() - self._start_time)
        self._print(datetime.timedelta(seconds=duration))
218109
function printTimingAndExit(startTime) {
  const execTime = time() - startTime;

  printColumns(chalk.green(`Finished in: ${execTime.toFixed()}ms`));
  process.exit(0);
}
630186
private void reportStats(PolicyStats stats) throws IOException {
    reporter.add(stats);
    if (--remaining == 0) {
      reporter.print();
      context().stop(self());
      System.out.println("Executed in " + stopwatch);
    }
  }
847526
public synchronized void printStatistics() {
        ClientStats stats = periodicStatsContext.fetchAndResetBaseline().getStats();
        long time = Math.round((stats.getEndTimestamp() - benchmarkStartTS) / 1000.0);

        System.out.printf("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60);
        System.out.printf("Throughput %d/s, ", stats.getTxnThroughput());
        System.out.printf("Aborts/Failures %d/%d",
                stats.getInvocationAborts(), stats.getInvocationErrors());
        System.out.printf("\n");
    }
1271091
private void doLog(long lastRun, long finalMoment)
    {
        double[] percentilenames = m_percentiles;

        //
        //  Do logging, if requested.
        //
        if( m_mode == Mode.LOG_ONLY || m_mode == Mode.ALL )
        {
            if( m_log != null && m_log.isInfoEnabled() )
            {
                StringBuilder percString = new StringBuilder();
                for( int i = 0; i < percentilenames.length; i++ )
                {
                    percString.append( String.format( " %6sth", saneDoubleToString(percentilenames[i]) ) );
                }
                
                printf("Statistics from %tc to %tc", new Date(lastRun), new Date(finalMoment));

                printf("%-"+m_tagWidth+"s %8s %8s %8s %8s%s%8s","Tag","Avg(ms)","Min","Max","Std Dev",percString,"Count");

                for( Map.Entry<String,CollectedStatistics> e : m_stats.entrySet() )
                {
                    CollectedStatistics cs = e.getValue();
                    StringBuilder sb = new StringBuilder();
                    
                    sb.append(String.format("%-"+m_tagWidth+"s %8.2f %8.2f %8.2f %8.2f", e.getKey(),cs.getAverageMS(), cs.getMin(), cs.getMax(), cs.getStdDev()));
                    for( int i = 0; i < percentilenames.length; i++ )
                        sb.append( String.format(" %8.2f", cs.getPercentile( percentilenames[i] )) );
                    
                    sb.append( String.format("%8d", cs.getInvocations()) );
                    m_log.info( sb.toString() );
                    
                    //
                    //  Only collect threshold information when the slow logging
                    //  is on.  Otherwise the array grows without bounds.
                    //
                    if( m_slowLogOn && m_slowLog != null )
                    {
                        long threshold = (long)(cs.getPercentile(m_slowLogPercentile)*1000);
                        m_slowThresholdMicros.put( e.getKey(), threshold );
                    }
                }
                
                m_log.info( "" );
            }
        }

        //
        //  Store these to the JMX attribute list
        //

        if( m_mode == Mode.JMX_ONLY || m_mode == Mode.ALL )
        {
            if( m_jmxAttributes != null )
            {
                m_jmxStatistics = new ConcurrentHashMap<String, PeriodicalLog.JmxStatistics>();

                for( String name : m_jmxAttributes )
                {
                    String n = name.trim();
                    CollectedStatistics cs = m_stats.get(n);

                    if ( cs == null )
                        continue;

                    JmxStatistics js = new JmxStatistics();
                    js.count = cs.getInvocations();
                    js.max = cs.getMax();
                    js.min = cs.getMin();
                    js.mean = cs.getAverageMS();
                    js.percentiles = new double[percentilenames.length];
                    
                    for( int i = 0; i < percentilenames.length; i++ )
                        js.percentiles[i] = cs.getPercentile( percentilenames[i] );
                    
                    js.stddev = cs.getStdDev();
                    m_jmxStatistics.put(n, js);
                }
            }
        }

        resetForNextPeriod();
    }
644221
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions,
        boolean quickPath
    ) throws IOException {

        int start = -1;
        int printed = 0;

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        TZID tzid = null;
        ZonalOffset offset;

        if (formattable.hasTimezone()) {
            tzid = formattable.getTimezone();
        }

        if (tzid == null) {
            offset = getOffset(formattable, attributes);
        } else if (tzid instanceof ZonalOffset) {
            offset = (ZonalOffset) tzid;
        } else if (formattable instanceof UnixTime) {
            offset = Timezone.of(tzid).getOffset((UnixTime) formattable);
        } else {
            throw new IllegalArgumentException(
                "Cannot extract timezone offset from: " + formattable);
        }

        int total = offset.getIntegralAmount();
        int fraction = offset.getFractionalAmount();

        if ((total | fraction) == 0) {
            String zeroOffset = this.zeroOffsets.get(0);
            buffer.append(zeroOffset);
            printed = zeroOffset.length();
        } else {
            boolean negative = ((total < 0) || (fraction < 0));
            buffer.append(negative ? '-' : '+');
            printed++;

            int absValue = Math.abs(total);
            int h = absValue / 3600;
            int m = (absValue / 60) % 60;
            int s = absValue % 60;

            if (h < 10) {
                buffer.append('0');
                printed++;
            }

            String hours = String.valueOf(h);
            buffer.append(hours);
            printed += hours.length();

            if (
                (this.precision != SHORT)
                || (m != 0)
            ) {
                if (this.extended) {
                    buffer.append(':');
                    printed++;
                }

                if (m < 10) {
                    buffer.append('0');
                    printed++;
                }

                String minutes = String.valueOf(m);
                buffer.append(minutes);
                printed += minutes.length();

                if (
                    (this.precision != SHORT)
                    && (this.precision != MEDIUM)
                ) {
                    if ((this.precision == FULL) || ((s | fraction) != 0)) {
                        if (this.extended) {
                            buffer.append(':');
                            printed++;
                        }

                        if (s < 10) {
                            buffer.append('0');
                            printed++;
                        }

                        String seconds = String.valueOf(s);
                        buffer.append(seconds);
                        printed += seconds.length();

                        if (fraction != 0) {
                            buffer.append('.');
                            printed++;
                            String f = String.valueOf(Math.abs(fraction));
                            for (int i = 0, n = 9 - f.length(); i < n; i++) {
                                buffer.append('0');
                                printed++;
                            }
                            buffer.append(f);
                            printed += f.length();
                        }
                    }
                }
            }
        }

        if (
            (start != -1)
            && (printed > 0)
            && (positions != null)
        ) {
            positions.add(
                new ElementPosition(
                    TimezoneElement.TIMEZONE_ID,
                    start,
                    start + printed));
        }

        return printed;

    }
862810
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions,
        boolean quickPath
    ) throws IOException {

        int start = -1;
        int printed = 0;

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        TZID tzid = null;
        ZonalOffset offset;

        if (formattable.hasTimezone()) {
            tzid = formattable.getTimezone();
        }

        if (tzid == null) {
            offset = getOffset(formattable, attributes);
        } else if (tzid instanceof ZonalOffset) {
            offset = (ZonalOffset) tzid;
        } else if (formattable instanceof UnixTime) {
            offset = Timezone.of(tzid).getOffset((UnixTime) formattable);
        } else {
            throw new IllegalArgumentException(
                "Cannot extract timezone offset from: " + formattable);
        }

        Locale loc = (quickPath ? this.locale : attributes.get(Attributes.LANGUAGE, Locale.ROOT));
        char zeroChar = (
            quickPath
                ? this.zeroDigit
                : attributes.get(Attributes.ZERO_DIGIT, Character.valueOf('0')).charValue());
        String plus = (quickPath ? this.plusSign : attributes.get(AttributeSet.PLUS_SIGN, "+"));
        String minus = (quickPath ? this.minusSign : attributes.get(AttributeSet.MINUS_SIGN, "-"));

// hack for cldr-version before v30
//        if ("ar".equals(loc.getLanguage()) && (zeroChar == '0')) {
//            plus = UNICODE_LRM + "+";
//            minus = UNICODE_LRM + "\u002D";
//        }

        boolean np = (
            quickPath
                ? this.noPrefix
                : attributes.get(Attributes.NO_GMT_PREFIX, Boolean.FALSE).booleanValue());

        int total = offset.getIntegralAmount();
        int fraction = offset.getFractionalAmount();

        if (!np && (total == 0) && (fraction == 0)) {
            String literal = getLiteralUTC(loc);
            buffer.append(literal);
            printed = literal.length();
        } else {
            Info info = getPatternInfo(loc);

            for (int p = 0, n = info.pattern.length(); p < n; p++) {
                char c = info.pattern.charAt(p);

                // literal
                if ((info.start > p) || (info.end <= p)) {
                    if (!np) {
                        buffer.append(c);
                        printed++;
                    }
                    continue;
                }

                // offset sign
                if (offset.getSign() == BEHIND_UTC) {
                    buffer.append(minus);
                    printed += minus.length();
                } else {
                    buffer.append(plus);
                    printed += plus.length();
                }

                // hour part
                int h = offset.getAbsoluteHours();
                int m = offset.getAbsoluteMinutes();
                int s = offset.getAbsoluteSeconds();

                if ((h < 10) && !this.abbreviated) {
                    buffer.append(zeroChar);
                    printed++;
                }

                String hours = String.valueOf(h);

                for (int i = 0; i < hours.length(); i++) {
                    char digit = (char) (hours.charAt(i) - '0' + zeroChar);
                    buffer.append(digit);
                    printed++;
                }

                // minute part
                if ((m != 0) || (s != 0) || !this.abbreviated) {
                    buffer.append(info.separator);
                    printed += info.separator.length();

                    if (m < 10) {
                        buffer.append(zeroChar);
                        printed++;
                    }

                    String minutes = String.valueOf(m);

                    for (int i = 0; i < minutes.length(); i++) {
                        char digit = (char) (minutes.charAt(i) - '0' + zeroChar);
                        buffer.append(digit);
                        printed++;
                    }

                    // second part
                    if (s != 0) {
                        buffer.append(info.separator);
                        printed += info.separator.length();

                        if (s < 10) {
                            buffer.append(zeroChar);
                            printed++;
                        }

                        String seconds = String.valueOf(s);

                        for (int i = 0; i < seconds.length(); i++) {
                            char digit = (char) (seconds.charAt(i) - '0' + zeroChar);
                            buffer.append(digit);
                            printed++;
                        }
                    }

                }

                p = (info.end - 1);
            }
        }

        if (
            (start != -1)
            && (printed > 0)
            && (positions != null)
        ) {
            positions.add(
                new ElementPosition(
                    TimezoneElement.TIMEZONE_ID,
                    start,
                    start + printed));
        }

        return printed;

    }
112016
public String report() {
		StringBuilder sb = new StringBuilder();

		sb.append(String.format("%d CONTINUES / LINES:\n", numContinues));
		sb.append(String.format("TOTAL TIME: %s\n", formatMillisecs(continueTotal)));
		sb.append(String.format("SNAPSHOTTING: %s\n", formatMillisecs(snapTotal)));
		sb.append(String.format("OTHER: %s\n", formatMillisecs(continueTotal - (stepTotal + snapTotal))));
		sb.append(rootNode.toString());

		return sb.toString();
	}
184821
def print_summary(self, w=0, objs=(), **print3opts):
        '''
        '''
        self._printf('%*d bytes%s%s', w, self._total, _SI(self._total), self._incl, **print3opts)
        if self._mask:
            self._printf('%*d byte aligned', w, self._mask + 1, **print3opts)
        self._printf('%*d byte sizeof(void*)', w, _sizeof_Cvoidp, **print3opts)
        n = len(objs or ())
        if n > 0:
            d = self._duplicate or ''
            if d:
                d = ', %d duplicate' % self._duplicate
            self._printf('%*d object%s given%s', w, n, _plural(n), d, **print3opts)
        t = _sum([1 for t in _values(self._seen) if t != 0])  # [] for Python 2.2
        self._printf('%*d object%s sized', w, t, _plural(t), **print3opts)
        if self._excl_d:
            t = _sum(_values(self._excl_d))
            self._printf('%*d object%s excluded', w, t, _plural(t), **print3opts)
        t = _sum(_values(self._seen))
        self._printf('%*d object%s seen', w, t, _plural(t), **print3opts)
        if self._missed > 0:
            self._printf('%*d object%s missed', w, self._missed, _plural(self._missed), **print3opts)
        if self._depth > 0:
            self._printf('%*d recursion depth', w, self._depth, **print3opts)
1233597
public synchronized void printResults() throws Exception {
        ClientStats stats = fullStatsContext.fetch().getStats();

        // 1. Voting Board statistics, Voting results and performance statistics
        String display = "\n" +
                         HORIZONTAL_RULE +
                         " Voting Results\n" +
                         HORIZONTAL_RULE +
                         "\nA total of %,9d votes were received during the benchmark...\n" +
                         " - %,9d Accepted\n" +
                         " - %,9d Rejected (Invalid Contestant)\n" +
                         " - %,9d Rejected (Maximum Vote Count Reached)\n" +
                         " - %,9d Failed (Transaction Error)\n\n";
        System.out.printf(display, totalVotes.get(),
                acceptedVotes.get(), badContestantVotes.get(),
                badVoteCountVotes.get(), failedVotes.get());

        // 2. Voting results
        VoltTable result = client.callProcedure("Results").getResults()[0];

        System.out.println("Contestant Name\t\tVotes Received");
        while(result.advanceRow()) {
            System.out.printf("%s\t\t%,14d\n", result.getString(0), result.getLong(2));
        }
        System.out.printf("\nThe Winner is: %s\n\n", result.fetchRow(0).getString(0));

        // 3. Performance statistics
        System.out.print(HORIZONTAL_RULE);
        System.out.println(" Client Workload Statistics");
        System.out.println(HORIZONTAL_RULE);

        System.out.printf("Average throughput:            %,9d txns/sec\n", stats.getTxnThroughput());
        if(this.config.latencyreport) {
            System.out.printf("Average latency:               %,9.2f ms\n", stats.getAverageLatency());
            System.out.printf("10th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.1));
            System.out.printf("25th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.25));
            System.out.printf("50th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.5));
            System.out.printf("75th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.75));
            System.out.printf("90th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.9));
            System.out.printf("95th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.95));
            System.out.printf("99th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.99));
            System.out.printf("99.5th percentile latency:     %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.995));
            System.out.printf("99.9th percentile latency:     %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.999));

            System.out.print("\n" + HORIZONTAL_RULE);
            System.out.println(" System Server Statistics");
            System.out.println(HORIZONTAL_RULE);
            System.out.printf("Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());

            System.out.print("\n" + HORIZONTAL_RULE);
            System.out.println(" Latency Histogram");
            System.out.println(HORIZONTAL_RULE);
            System.out.println(stats.latencyHistoReport());
        }
        // 4. Write stats to file if requested
        client.writeSummaryCSV(stats, config.statsfile);
    }