Class PrintStyle


  • public class PrintStyle
    extends Object
    Defines a set of attributes used by a PrintFormat to generate a String output out of a timing-session container.
    Since:
    2.2.1
    Author:
    oswaldo.bapvic.jr
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PrintStyle DETAILED_CSV
      A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values).
      static PrintStyle DETAILED_CSV_ISO_8601
      A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format.
      static PrintStyle DETAILED_CSV_ISO_8601_NO_HEADER
      A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format and no header.
      static PrintStyle DETAILED_CSV_NO_HEADER
      A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), without header.
      static PrintStyle DETAILED_TABLE_FULL
      A string-based style for the detailed timing-session-container format, with horizontal lines separating each row, and total elapsed time for each counter.
      static PrintStyle DETAILED_XML
      A string-based style for the detailed timing-session-container format, which prints data in XML format.
      static PrintStyle DETAILED_XML_ISO_8601
      A string-based style for the detailed timing-session-container format, which prints data as XML with elapsed times expressed using the ISO-8601 duration format.
      static PrintStyle DETAILED_YAML
      A string-based style for the detailed timing-session-container format, which prints data in YAML format.
      static PrintStyle DETAILED_YAML_ISO_8601
      A string-based style for the detailed timing-session-container format, which prints data as YAML with elapsed times expressed using the ISO-8601 duration format.
      static PrintStyle LINUX
      A string-based style which prints data from a timing-session-container in Linux style.
      static PrintStyle SUMMARIZED_CSV
      A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values).
      static PrintStyle SUMMARIZED_CSV_ISO_8601
      A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format.
      static PrintStyle SUMMARIZED_CSV_ISO_8601_NO_HEADER
      A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format and no header.
      static PrintStyle SUMMARIZED_CSV_NO_HEADER
      A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), without header.
      static PrintStyle SUMMARIZED_TABLE_FULL
      A string-based style for the summarized timing-session-container format, 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 timing-session-container format, which prints data in tabular format without header.
      static PrintStyle SUMMARIZED_XML
      A string-based style for the summarized timing-session-container format, which prints data in XML format.
      static PrintStyle SUMMARIZED_XML_ISO_8601
      A string-based style for the summarized timing-session-container format, which prints data as XML with elapsed times expressed using the ISO-8601 duration format.
      static PrintStyle SUMMARIZED_YAML
      A string-based style for the summarized timing-session-container format, which prints data in YAML format.
      static PrintStyle SUMMARIZED_YAML_ISO_8601
      A string-based style for the summarized timing-session-container format, which prints data as YAML with elapsed times expressed using the ISO-8601 duration format.
    • Field Detail

      • SUMMARIZED_TABLE_NO_HEADER

        public static final PrintStyle SUMMARIZED_TABLE_NO_HEADER
        A string-based style for the summarized timing-session-container format, which prints data in tabular format without header.

        Elapsed times are expressed in the format H:M:S.ns.

        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
         
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_TABLE_FULL

        public static final PrintStyle SUMMARIZED_TABLE_FULL
        A string-based style for the summarized timing-session-container format, which prints data in tabular format, with horizontal lines separating each row.

        Elapsed times are expressed in the format H:M:S.ns.

        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
         ====================================
         
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_CSV

        public static final PrintStyle SUMMARIZED_CSV
        A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values).

        Elapsed times are expressed in the format H:M:S.ns.

        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"
         
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_CSV_NO_HEADER

        public static final PrintStyle SUMMARIZED_CSV_NO_HEADER
        A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), without header.

        Elapsed times are expressed in the format H:M:S.ns.

        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"
         
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_CSV_ISO_8601

        public static final PrintStyle SUMMARIZED_CSV_ISO_8601
        A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         "Counter","Elapsed time"
         "Wall clock time","PT4.4553835S"
         "CPU time","PT0.109375S"
         "User time","PT0.046875S"
         "System time","PT0.0625S"
         
        Since:
        2.2.4
        See Also:
        DurationFormat.ISO_8601, PrintFormat.SUMMARIZED
      • SUMMARIZED_CSV_ISO_8601_NO_HEADER

        public static final PrintStyle SUMMARIZED_CSV_ISO_8601_NO_HEADER
        A string-based style for the summarized timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format and no header.

        Sample output:

         "Wall clock time","PT4.4553835S"
         "CPU time","PT0.109375S"
         "User time","PT0.046875S"
         "System time","PT0.0625S"
         
        Since:
        2.2.4
        See Also:
        DurationFormat.ISO_8601, PrintFormat.SUMMARIZED
      • SUMMARIZED_XML

        public static final PrintStyle SUMMARIZED_XML
        A string-based style for the summarized timing-session-container format, which prints data in XML format.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         <counters>
           <counter type="Wall clock time">0:00:01.352886500</counter>
           <counter type="CPU time">0:00:00.062500000</counter>
           <counter type="User time">0:00:00.031250000</counter>
           <counter type="System time">0:00:00.031250000</counter>
         </counters>
         
        Since:
        2.3.0
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_XML_ISO_8601

        public static final PrintStyle SUMMARIZED_XML_ISO_8601
        A string-based style for the summarized timing-session-container format, which prints data as XML with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         <counters>
           <counter type="Wall clock time">PT1.3528865S</counter>
           <counter type="CPU time">PT0.0625S</counter>
           <counter type="User time">PT0.03125S</counter>
           <counter type="System time">PT0.03125S</counter>
         </counters>
         
        Since:
        2.3.0
        See Also:
        DurationFormat.ISO_8601, PrintFormat.SUMMARIZED
      • SUMMARIZED_YAML

        public static final PrintStyle SUMMARIZED_YAML
        A string-based style for the summarized timing-session-container format, which prints data in YAML format.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         counters:
         - type: Wall clock time
           value: '0:00:01.352886500'
         - type: CPU time
           value: '0:00:00.062500000'
         - type: User time
           value: '0:00:00.031250000'
         - type: System time
           value: '0:00:00.031250000'
         
        Since:
        2.4.0
        See Also:
        PrintFormat.SUMMARIZED, DurationFormat.FULL
      • SUMMARIZED_YAML_ISO_8601

        public static final PrintStyle SUMMARIZED_YAML_ISO_8601
        A string-based style for the summarized timing-session-container format, which prints data as YAML with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         counters:
         - type: Wall clock time
           value: PT1.3528865S
         - type: CPU time
           value: PT0.0625S
         - type: User time
           value: PT0.03125S
         - type: System time
           value: PT0.03125S
         
        Since:
        2.4.0
        See Also:
        DurationFormat.ISO_8601, PrintFormat.SUMMARIZED
      • DETAILED_TABLE_FULL

        public static final PrintStyle DETAILED_TABLE_FULL
        A string-based style for the detailed timing-session-container format, with horizontal lines separating each row, and total elapsed time for each counter.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         ===============================================
             #         Elapsed time     Elapsed time (+)
         ===============================================
         Wall clock time
         -----------------------------------------------
             0    0:00:01.055824100    0:00:01.055824100
             1    0:00:00.836569500    0:00:01.892393600
             2    0:00:00.836091100    0:00:02.728484700
             3    0:00:00.837092700    0:00:03.565577400
         -----------------------------------------------
         TOTAL                         0:00:03.565577400
         ===============================================
         CPU time
         -----------------------------------------------
             0    0:00:00.109375000    0:00:00.109375000
             1    0:00:00.000000000    0:00:00.109375000
             2    0:00:00.000000000    0:00:00.109375000
             3    0:00:00.015625000    0:00:00.125000000
         -----------------------------------------------
         TOTAL                         0:00:00.125000000
         ===============================================
         
        See Also:
        PrintFormat.DETAILED, DurationFormat.FULL
      • DETAILED_CSV

        public static final PrintStyle DETAILED_CSV
        A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values).

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         "Counter","Session","Elapsed time","Elapsed time (+)"
         "Wall clock time",0,"0:00:00.032319200","0:00:00.032319200"
         "Wall clock time",1,"0:00:00.016766500","0:00:00.049085700"
         "Wall clock time",2,"0:00:00.014459500","0:00:00.063545200"
         "CPU time",0,"0:00:00.031250000","0:00:00.031250000"
         "CPU time",1,"0:00:00.015625000","0:00:00.046875000"
         "CPU time",2,"0:00:00.015625000","0:00:00.062500000"
         
        Since:
        2.2.2
        See Also:
        PrintFormat.DETAILED, DurationFormat.FULL
      • DETAILED_CSV_NO_HEADER

        public static final PrintStyle DETAILED_CSV_NO_HEADER
        A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), without header.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         "Wall clock time",0,"0:00:00.032319200","0:00:00.032319200"
         "Wall clock time",1,"0:00:00.016766500","0:00:00.049085700"
         "Wall clock time",2,"0:00:00.014459500","0:00:00.063545200"
         "CPU time",0,"0:00:00.031250000","0:00:00.031250000"
         "CPU time",1,"0:00:00.015625000","0:00:00.046875000"
         "CPU time",2,"0:00:00.015625000","0:00:00.062500000"
         
        Since:
        2.2.2
        See Also:
        PrintFormat.DETAILED, DurationFormat.FULL
      • DETAILED_CSV_ISO_8601

        public static final PrintStyle DETAILED_CSV_ISO_8601
        A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         "Counter","Session","Elapsed time","Elapsed time (+)"
         "Wall clock time",0,"PT0.0323192S","PT0.0323192S"
         "Wall clock time",1,"PT0.0167665S","PT0.0490857S"
         "CPU time",0,"PT0.03125S","PT0.03125S"
         "CPU time",1,"PT0.015625S","PT0.046875S"
         
        Since:
        2.2.4
        See Also:
        DurationFormat.ISO_8601, PrintFormat.DETAILED
      • DETAILED_CSV_ISO_8601_NO_HEADER

        public static final PrintStyle DETAILED_CSV_ISO_8601_NO_HEADER
        A string-based style for the detailed timing-session-container format, which prints data as CSV (comma-separated values), with elapsed times expressed using the ISO-8601 duration format and no header.

        Sample output:

         "Wall clock time",0,"PT0.0323192S","PT0.0323192S"
         "Wall clock time",1,"PT0.0167665S","PT0.0490857S"
         "CPU time",0,"PT0.03125S","PT0.03125S"
         "CPU time",1,"PT0.015625S","PT0.046875S"
         
        Since:
        2.2.4
        See Also:
        DurationFormat.ISO_8601, PrintFormat.DETAILED
      • DETAILED_XML

        public static final PrintStyle DETAILED_XML
        A string-based style for the detailed timing-session-container format, which prints data in XML format.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         <counters>
           <counter type="Wall clock time">
             <session index="0">0:00:01.371288100</session>
             <session index="1">0:00:01.103620000</session>
             <total>0:00:02.474908100</total>
           </counter>
           <counter type="CPU time">
             <session index="0">0:00:00.031250000</session>
             <session index="1">0:00:00.015625000</session>
             <total>0:00:00.046875000</total>
           </counter>
         </counters>
         
        Since:
        2.3.0
        See Also:
        PrintFormat.DETAILED, DurationFormat.FULL
      • DETAILED_XML_ISO_8601

        public static final PrintStyle DETAILED_XML_ISO_8601
        A string-based style for the detailed timing-session-container format, which prints data as XML with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         <counters>
           <counter type="Wall clock time">
             <session index="0">PT1.357239099S</session>
             <session index="1">PT1.1036874</session>
             <total>PT2.460926499S</total>
           </counter>
           <counter type="CPU time">
             <session index="0">PT0.1875S</session>
             <session index="1">PT0.015625S</session>
             <total>PT0.203125S</total>
           </counter>
         </counters>
         
        Since:
        2.3.0
        See Also:
        DurationFormat.ISO_8601, PrintFormat.DETAILED
      • DETAILED_YAML

        public static final PrintStyle DETAILED_YAML
        A string-based style for the detailed timing-session-container format, which prints data in YAML format.

        Elapsed times are expressed in the format H:M:S.ns.

        Sample output:

         counters:
         - type: Wall clock time
           sessions:
           - '0:00:01.371288100'
           - '0:00:01.103620000'
           total: '0:00:02.474908100'
         - type="CPU time">
           sessions:
           - '0:00:00.031250000'
           - '0:00:00.015625000'
           total: 0:00:00.046875000
         
        Since:
        2.4.0
        See Also:
        PrintFormat.DETAILED, DurationFormat.FULL
      • DETAILED_YAML_ISO_8601

        public static final PrintStyle DETAILED_YAML_ISO_8601
        A string-based style for the detailed timing-session-container format, which prints data as YAML with elapsed times expressed using the ISO-8601 duration format.

        Sample output:

         counters:
         - type: Wall clock time
           sessions:
           - '0:00:01.371288100'
           - '0:00:01.103620000'
           total: '0:00:02.474908100'
         - type="CPU time">
           sessions:
           - '0:00:00.031250000'
           - '0:00:00.015625000'
           total: 0:00:00.046875000
         
        Since:
        2.4.0
        See Also:
        PrintFormat.DETAILED, DurationFormat.ISO_8601
    • Method Detail

      • builder

        public static PrintStyleBuilder builder​(PrintStyle source)
        Returns a PrintStyle builder with the same attributes of an existing PrintStyle.
        Parameters:
        source - the PrintStyle whose attributes are to be copied
        Returns:
        a new PrintStyleBuilder instance with the same attributes of the specified source object
        Throws:
        NullPointerException - if the specified PrintStyle is null
        Since:
        2.2.2
      • toString

        public String toString​(TimingSessionContainer container)
        Generates a string containing the formatted timing-session-container output in this style.
        Parameters:
        container - the timing-session container to be printed; not null
        Returns:
        a string containing the formatted output in this style
        Throws:
        NullPointerException - if the specified timing-session-container is null
        Since:
        2.4.0