public class PrintStyle extends Object
PrintFormat to generate a tabular
string output out of a Stopwatch object.| Modifier and Type | Field and Description |
|---|---|
static PrintStyle |
DETAILED_TABLE_FULL
A string-based style for use with the detailed stopwatch formatter, with horizontal
lines separating each row, and total elapsed time for each counter.
|
static PrintStyle |
SUMMARIZED_CSV
A string-based style for the summarized stopwatch formatter, which prints data
as CSV (comma-separated values).
|
static PrintStyle |
SUMMARIZED_CSV_NO_HEADER
A string-based style for the summarized stopwatch formatter, which prints data
as CSV (comma-separated values), without header.
|
static PrintStyle |
SUMMARIZED_TABLE_FULL
A string-based style for the summarized stopwatch formatter, which prints data
in tabular format, with horizontal lines separating each row.
|
static PrintStyle |
SUMMARIZED_TABLE_NO_HEADER
A string-based style for the summarized stopwatch formatter, which prints data
in tabular format without header.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlternativeLine() |
DurationFormat |
getDurationFormat() |
String |
getHeaderFormat() |
String |
getRowFormat() |
String |
getSectionHeaderFormat() |
String |
getSectionSummaryRowFormat() |
String |
getSimpleLine() |
boolean |
isPrintHeader() |
boolean |
isPrintLegend() |
boolean |
isPrintSectionSummary() |
public static final PrintStyle SUMMARIZED_TABLE_NO_HEADER
Sample output:
Wall clock time 0:00:04.455383500 CPU time 0:00:00.109375000 User time 0:00:00.046875000 System time 0:00:00.062500000
PrintFormat.SUMMARIZEDpublic static final PrintStyle SUMMARIZED_TABLE_FULL
Sample output:
==================================== Counter Elapsed time ------------------------------------ Wall clock time 0:00:04.455383500 CPU time 0:00:00.109375000 User time 0:00:00.046875000 System time 0:00:00.062500000 ====================================
PrintFormat.SUMMARIZEDpublic static final PrintStyle SUMMARIZED_CSV
Sample output:
"Counter","Elapsed time" "Wall clock time","0:00:04.455383500" "CPU time","0:00:00.109375000" "User time","0:00:00.046875000" "System time","0:00:00.062500000"
PrintFormat.SUMMARIZEDpublic static final PrintStyle SUMMARIZED_CSV_NO_HEADER
Sample output:
"Wall clock time","0:00:04.455383500" "CPU time","0:00:00.109375000" "User time","0:00:00.046875000" "System time","0:00:00.062500000"
PrintFormat.SUMMARIZEDpublic static final PrintStyle DETAILED_TABLE_FULL
Sample output:
===============================================
# Elapsed time Elapsed time (+)
===============================================
Wall clock time
-----------------------------------------------
1 0:00:01.055824100 0:00:01.055824100
2 0:00:00.836569500 0:00:01.892393600
3 0:00:00.836091100 0:00:02.728484700
4 0:00:00.837092700 0:00:03.565577400
-----------------------------------------------
TOTAL 0:00:03.565577400
===============================================
CPU time
-----------------------------------------------
1 0:00:00.109375000 0:00:00.109375000
2 0:00:00.000000000 0:00:00.109375000
3 0:00:00.000000000 0:00:00.109375000
4 0:00:00.015625000 0:00:00.125000000
-----------------------------------------------
TOTAL 0:00:00.125000000
===============================================
PrintFormat.DETAILEDpublic DurationFormat getDurationFormat()
DurationFormat to be applied on all rowspublic boolean isPrintLegend()
public boolean isPrintHeader()
public boolean isPrintSectionSummary()
public String getHeaderFormat()
public String getRowFormat()
public String getSectionHeaderFormat()
public String getSectionSummaryRowFormat()
public String getSimpleLine()
public String getAlternativeLine()
Copyright © 2021. All rights reserved.