Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: tracing/tracing/extras/rail/load_interaction_record.html

Issue 1357983002: Invert pain to comfort throughout tracing. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/extras/rail/load_interaction_record.html
diff --git a/tracing/tracing/extras/rail/load_interaction_record.html b/tracing/tracing/extras/rail/load_interaction_record.html
index d401a18947a41bec80af5d3c70783afddca91c68..d51bec67883418373e4e00376a12d101c69db731 100644
--- a/tracing/tracing/extras/rail/load_interaction_record.html
+++ b/tracing/tracing/extras/rail/load_interaction_record.html
@@ -13,9 +13,9 @@ found in the LICENSE file.
* @fileoverview The Load phase of RAIL.
*/
tr.exportTo('tr.e.rail', function() {
- // The computeNormalizedPain regions are delineated at these millisecond
+ // The computeNormalizedComfort regions are delineated at these millisecond
// latency values.
- var PAIN_LATENCY_REGIONS = [1000, 5000, 20000, 60000];
+ var COMFORT_LATENCY_REGIONS = [1000, 5000, 20000, 60000];
function LoadInteractionRecord(start, duration) {
tr.e.rail.RAILInteractionRecord.call(
@@ -26,13 +26,13 @@ tr.exportTo('tr.e.rail', function() {
LoadInteractionRecord.prototype = {
__proto__: tr.e.rail.RAILInteractionRecord.prototype,
- get normalizedUserPain() {
+ get normalizedUserComfort() {
// https://www.desmos.com/calculator/ddcv31509h
- return tr.e.rail.computeNormalizedPain(this.duration, {
- minValueExponential: PAIN_LATENCY_REGIONS[0],
- minValueLinear: PAIN_LATENCY_REGIONS[1],
- minValueLogarithmic: PAIN_LATENCY_REGIONS[2],
- maxValue: PAIN_LATENCY_REGIONS[3]
+ return 1 - tr.e.rail.computeNormalizedComfort(this.duration, {
+ minValueExponential: COMFORT_LATENCY_REGIONS[0],
+ minValueLinear: COMFORT_LATENCY_REGIONS[1],
+ minValueLogarithmic: COMFORT_LATENCY_REGIONS[2],
+ maxValue: COMFORT_LATENCY_REGIONS[3]
});
}
};

Powered by Google App Engine
This is Rietveld 408576698