PerfTestFormat class
Output format for all tests
Constructors
- PerfTestFormat({String? borderFormat = '+-', String lineFormat = '| $stubFieldName | $stubFieldRatio | $stubFieldValue |', num? infinity = 9999.99, bool isQuiet = false, bool isRaw = false, PerfTestPrinter printer = print, String quote = '"', String quoteEscaped = '""', bool usePercent = false, DateFormat? dateFormat, NumberFormat? numberFormat, NumberFormat? percentFormat})
- The constructor
Properties
- cornerChar ↔ String
-
Character for drawing grid corners and crossings
latefinal
- dateFormat ↔ DateFormat
-
Format for dates
latefinal
- fieldSeparator ↔ String
-
First character in lineFormat after all stubs removed
(not found => space)
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- horBarChar ↔ String
-
Character for drawing horizontal bar
latefinal
- infinity ↔ num?
-
Special number for infinity (to keep data numeric)
latefinal
- isQuiet ↔ bool
-
Flag indicating that no output is expected
getter/setter pair
- isQuoted ↔ bool
-
Flag indicating the need to embrace a field in quotes
when necessary (i.e. lineFormat does not start with '{')
latefinal
- isRaw ↔ bool
-
Flag to avoid nice formatting of data and printing a grid around
getter/setter pair
- lineFormat ↔ String
-
Format of a line (see the default value in the constructor as an example)
getter/setter pair
- numberFormat ↔ NumberFormat
-
Format for numbers
latefinal
- percentFormat ↔ NumberFormat
-
Format for numbers
latefinal
- printer ↔ PerfTestPrinter
-
Actual function to send to the output, defaults to print from dart:core
latefinal
- quote ↔ String
-
Embracing quote character if isRaw is true
latefinal
- quoteEscaped ↔ String
-
Escaped version of quote
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usePercent ↔ bool
-
Flag to convert ratio to percentage rather than to leave it as a number
getter/setter pair
Methods
-
date(
DateTime value, [int maxWidth = 0]) → String - Date value formatter
-
duration(
Duration value, [int precision = 3]) → String - Duration value formatter
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
number(
num value, [int maxWidth = 0]) → String - Numeric value formatter
-
percent(
num value, [int maxWidth = 0]) → String - Percentage value formatter
-
string(
String value, [int maxWidth = 0, bool padLeft = false]) → String - String value formatter
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- prettyCsv → PerfTestFormat
-
Convenience pre-created object for the CSV output with formatted data
final
- rawCsv → PerfTestFormat
-
Convenience pre-created object for the CSV output with raw (unformatted) data
final
- stubRE → RegExp
-
Placeholder for the current date in the caption
final
Static Methods
-
createFsv(
{String fieldSeparator = ',', bool isRaw = true, bool usePercent = false}) → PerfTestFormat - Pre-defined format for the field-separated value output (raw)
Constants
- stubDate → const String
- Placeholder for the current date in the caption
- stubFieldName → const String
- Placeholder for the current date in the caption
- stubFieldRatio → const String
- Placeholder for the current date in the caption
- stubFieldValue → const String
- Placeholder for the current date in the caption
- stubSize → const String
- Placeholder for the limit (maxLaps or maxSpan) in the caption