Changeset 179766 in webkit


Ignore:
Timestamp:
Feb 6, 2015 3:31:30 PM (9 years ago)
Author:
rniwa@webkit.org
Message:

The delta value in the chart pane sometimes doens't show '+' for a positive delta
https://bugs.webkit.org/show_bug.cgi?id=141340

Reviewed by Andreas Kling.

The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.

  • public/v2/app.js:

(App.Pane.computeStatus):
(App.createChartData):

Location:
trunk/Websites/perf.webkit.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/perf.webkit.org/ChangeLog

    r179765 r179766  
     12015-02-06  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        The delta value in the chart pane sometimes doens't show '+' for a positive delta
     4        https://bugs.webkit.org/show_bug.cgi?id=141340
     5
     6        Reviewed by Andreas Kling.
     7
     8        The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
     9        it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
     10
     11        * public/v2/app.js:
     12        (App.Pane.computeStatus):
     13        (App.createChartData):
     14
    1152015-02-06  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Websites/perf.webkit.org/public/v2/app.js

    r179765 r179766  
    407407
    408408        var valueDelta = previousPoint ? chartData.deltaFormatter(currentPoint.value - previousPoint.value) : null;
    409         if (valueDelta && valueDelta > 0)
    410             valueDelta = '+' + valueDelta;
    411 
    412409        return {className: className, label: label, currentValue: chartData.formatter(currentPoint.value), valueDelta: valueDelta};
    413410    },
     
    446443        unit: data.unit,
    447444        formatter: data.useSI ? d3.format('.4s') : d3.format('.4g'),
    448         deltaFormatter: data.useSI ? d3.format('.2s') : d3.format('.2g'),
     445        deltaFormatter: data.useSI ? d3.format('+.2s') : d3.format('+.2g'),
    449446        smallerIsBetter: data.smallerIsBetter,
    450447    };
Note: See TracChangeset for help on using the changeset viewer.