Skip to content

add else branch to assign u := '' for non-kIsRate counters on console output #7

@Asfalan

Description

@Asfalan

Currently any non-kIsRate counter that follows a kIsRate counter gets printed to the console with the lastly set unit, either u := 's' or u := '/s' because the following if statement has no else branch that assigns u := '' for non-kIsRate counters:

benchmark/Spring.Benchmark.pas

Lines 4306 to 4310 in 7c4b8d9

if kIsRate in result.counters[i].counter.flags then
if kInvert in result.counters[i].counter.flags then
u := 's'
else
u := '/s';

Proposed fix: "added else branch to assign u := '' for non-kIsRate counters on console output"

    if kIsRate in result.counters[i].counter.flags then
      if kInvert in result.counters[i].counter.flags then
        u := 's'
      else
        u := '/s'
    else
      u := '';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions