PerfTestFormat class Null safety
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
late, final
- dateFormat ↔ DateFormat
-
Format for dates
late, final
- fieldSeparator ↔ String
-
First character in lineFormat after all stubs removed
(not found => space)
late, final
- hashCode → int
-
The hash code for this object.
read-only, inherited
- horBarChar ↔ String
-
Character for drawing horizontal bar
late, final
- infinity ↔ num?
-
Special number for infinity (to keep data numeric)
late, final
- isQuiet ↔ bool
-
Flag indicating that no output is expected
read / write
- isQuoted ↔ bool
-
Flag indicating the need to embrace a field in quotes
when necessary (i.e. lineFormat does not start with '{')
late, final
- isRaw ↔ bool
-
Flag to avoid nice formatting of data and printing a grid around
read / write
- lineFormat ↔ String
-
Format of a line (see the default value in the constructor as an example)
read / write
- numberFormat ↔ NumberFormat
-
Format for numbers
late, final
- percentFormat ↔ NumberFormat
-
Format for numbers
late, final
- printer ↔ PerfTestPrinter
-
Actual function to send to the output, defaults to print from dart:core
late, final
- quote ↔ String
-
Embracing quote character if isRaw is true
late, final
- quoteEscaped ↔ String
-
Escaped version of quote
late, final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- usePercent ↔ bool
-
Flag to convert ratio to percentage rather than to leave it as a number
read / write
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 non-existent 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
'{D}'
- stubFieldName → const String
-
Placeholder for the current date in the caption
'{N}'
- stubFieldRatio → const String
-
Placeholder for the current date in the caption
'{R}'
- stubFieldValue → const String
-
Placeholder for the current date in the caption
'{V}'
- stubSize → const String
-
Placeholder for the limit (maxLaps or maxSpan) in the caption
'{M}'