Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPII-4500: Fixed the "preference" metric. #878

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gpii/node_modules/eventLog/src/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fluid.defaults("gpii.metrics.lifecycle", {
}
},
listeners: {
"{lifecycleManager}.events.onCreate": {
"onCreate": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onCreate.trackPrefsSetChange?

namespace: "trackPrefsSetChange",
listener: "gpii.metrics.trackPrefsSetChange",
args: ["{that}", "{lifecycleManager}"]
Expand Down Expand Up @@ -222,7 +222,7 @@ gpii.metrics.preferenceChanged = function (that, current, previous) {
fluid.each(changedPreferences, function (value, name) {
that.logMetric("preference", {
name: name,
newValue: value.toString()
setTo: fluid.isPrimitive(value) ? value.toString() : value
});
});
}
Expand Down
20 changes: 10 additions & 10 deletions gpii/node_modules/eventLog/test/metricsTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: {
name: "pref1",
newValue: "changed value1"
setTo: "changed value1"
}
},
"changed 2/2": {
Expand All @@ -83,10 +83,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: [{
name: "pref1",
newValue: "changed value1"
setTo: "changed value1"
}, {
name: "pref2",
newValue: "changed value2"
setTo: "changed value2"
}]
},
"changed 2/3": {
Expand All @@ -102,10 +102,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: [{
name: "pref1",
newValue: "changed value1"
setTo: "changed value1"
}, {
name: "pref2",
newValue: "changed value2"
setTo: "changed value2"
}]
},
"add 1+1": {
Expand All @@ -118,7 +118,7 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: [{
name: "pref2",
newValue: "new value2"
setTo: "new value2"
}]
},
"add+change": {
Expand All @@ -131,10 +131,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: [{
name: "pref1",
newValue: "changed value1"
setTo: "changed value1"
}, {
name: "pref2",
newValue: "new value2"
setTo: "new value2"
}]
},
"remove 1-1": {
Expand Down Expand Up @@ -168,10 +168,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({
},
expect: [{
name: "pref2",
newValue: "changed value2"
setTo: "changed value2"
}, {
name: "pref4",
newValue: "new value4"
setTo: "new value4"
}]
}
});
Expand Down