public class PrintUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
print(Stopwatch stopwatch,
PrintStream printStream)
Prints elapsed times from the given stopwatch in the specified print stream.
|
static void |
print(Stopwatch stopwatch,
PrintStream printStream,
PrintStyle printStyle)
Prints elapsed times from the given stopwatch in the specified print stream, with a
custom
PrintStyle. |
static void |
printDetails(Stopwatch stopwatch,
PrintStream printStream)
Prints detailed information about timing sessions from the given stopwatch in the
specified print stream.
|
static void |
printDetails(Stopwatch stopwatch,
PrintStream printStream,
PrintStyle printStyle)
Prints detailed information about timing sessions from the given stopwatch in the
specified print stream, with a custom
PrintStyle. |
static void |
printSummary(Stopwatch stopwatch,
PrintStream printStream)
Prints summarized elapsed times from the given stopwatch in the specified print stream.
|
static void |
printSummary(Stopwatch stopwatch,
PrintStream printStream,
PrintStyle printStyle)
Prints summarized elapsed times from the given stopwatch in the specified print stream,
with a custom
PrintStyle. |
static String |
summaryToString(Stopwatch stopwatch)
Deprecated.
Use
toString(Stopwatch) instead. |
static String |
summaryToString(Stopwatch stopwatch,
PrintStyle printStyle)
Deprecated.
Use
toString(Stopwatch, PrintStyle) instead. |
static String |
toString(Stopwatch stopwatch)
Returns a string containing a formatted summary from the given stopwatch in default
style.
|
static String |
toString(Stopwatch stopwatch,
PrintStyle printStyle)
Returns a string containing a formatted output from the given stopwatch in a custom
PrintStyle. |
public static void printSummary(Stopwatch stopwatch, PrintStream printStream)
The default PrintStyle (defined by
Performetrics.setDefaultPrintStyleForSummary(PrintStyle)) will be applied.
stopwatch - the stopwatch to be printedprintStream - the print stream to which data will be sentNullPointerException - if a null stopwatch or print stream is receivedpublic static void printSummary(Stopwatch stopwatch, PrintStream printStream, PrintStyle printStyle)
PrintStyle.stopwatch - the stopwatch to be printedprintStream - the print stream to which data will be sentprintStyle - the PrintStyle; if null, the default
PrintStyle (defined by
Performetrics.setDefaultPrintStyleForSummary(PrintStyle))
will be appliedNullPointerException - if a null stopwatch or print stream is receivedIllegalArgumentException - if the specified PrintStyle is not compatible with
PrintFormat.SUMMARIZEDpublic static void printDetails(Stopwatch stopwatch, PrintStream printStream)
The default PrintStyle (defined by
Performetrics.setDefaultPrintStyleForDetails(PrintStyle)) will be applied.
stopwatch - the stopwatch to be printedprintStream - the print stream to which information will be sentNullPointerException - if a null stopwatch or print stream is receivedpublic static void printDetails(Stopwatch stopwatch, PrintStream printStream, PrintStyle printStyle)
PrintStyle.stopwatch - the stopwatch to be printedprintStream - the print stream to which information will be sentprintStyle - the PrintStyle; if null, the default
PrintStyle (defined by
Performetrics.setDefaultPrintStyleForDetails(PrintStyle))
will be appliedNullPointerException - if a null stopwatch or print stream is receivedIllegalArgumentException - if the specified PrintStyle is not compatible with
PrintFormat.DETAILED@Deprecated public static String summaryToString(Stopwatch stopwatch)
toString(Stopwatch) instead.stopwatch - to stopwatch to be used@Deprecated public static String summaryToString(Stopwatch stopwatch, PrintStyle printStyle)
toString(Stopwatch, PrintStyle) instead.PrintStyle.stopwatch - to stopwatch to be usedprintStyle - the PrintStyle to be applied; if null, the default
PrintStyle will be appliedpublic static void print(Stopwatch stopwatch, PrintStream printStream)
The default PrintStyle (defined by
Performetrics.setDefaultPrintStyle(PrintStyle)) will be applied.
stopwatch - the stopwatch to be printedprintStream - the print stream to which data will be sentNullPointerException - if a null stopwatch or print stream is receivedpublic static void print(Stopwatch stopwatch, PrintStream printStream, PrintStyle printStyle)
PrintStyle.
The PrintFormat (whether to generate a summarized or detailed view) will be
determined by the specified PrintStyle.
stopwatch - the stopwatch to be printed; not nullprintStream - the print stream to which data will be sent; not nullprintStyle - the PrintStyle; if null, the default
PrintStyle (defined by
Performetrics.setDefaultPrintStyle(PrintStyle)) will be
appliedNullPointerException - if a null stopwatch or print stream is receivedpublic static String toString(Stopwatch stopwatch)
The default PrintStyle (defined by
Performetrics.setDefaultPrintStyle(PrintStyle)) will be applied.
stopwatch - to stopwatch to be used; not nullpublic static String toString(Stopwatch stopwatch, PrintStyle printStyle)
PrintStyle.
The PrintFormat (whether to generate a summarized or detailed view) will be
determined by the specified PrintStyle.
stopwatch - to stopwatch to be usedprintStyle - the PrintStyle; if null, the default
PrintStyle (defined by
Performetrics.setDefaultPrintStyle(PrintStyle)) will be
appliedCopyright © 2023. All rights reserved.