pxt-core 9.2.6 → 9.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/pxt.js +13 -1
- package/built/pxtlib.d.ts +9 -1
- package/built/pxtlib.js +12 -1
- package/built/pxtsim.js +1 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtsim.js +1 -1
- package/built/web/pxtweb.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/docfiles/pxtweb/cookieCompliance.ts +10 -1
- package/package.json +1 -1
|
@@ -106,14 +106,21 @@ namespace pxt {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
export function report(filter: string = null) {
|
|
109
|
+
perfReportLogged = true;
|
|
110
|
+
|
|
109
111
|
if (enabled) {
|
|
112
|
+
const milestones: {[index: string]: number} = {};
|
|
113
|
+
const durations: {[index: string]: number} = {};
|
|
114
|
+
|
|
110
115
|
let report = `performance report:\n`
|
|
111
116
|
for (let [msg, time] of stats.milestones) {
|
|
112
117
|
if (!filter || msg.indexOf(filter) >= 0) {
|
|
113
118
|
let pretty = prettyStr(time)
|
|
114
119
|
report += `\t\t${msg} @ ${pretty}\n`
|
|
120
|
+
milestones[msg] = time;
|
|
115
121
|
}
|
|
116
122
|
}
|
|
123
|
+
|
|
117
124
|
report += `\n`
|
|
118
125
|
for (let [msg, start, duration] of stats.durations) {
|
|
119
126
|
let filterIncl = filter && msg.indexOf(filter) >= 0
|
|
@@ -125,10 +132,12 @@ namespace pxt {
|
|
|
125
132
|
}
|
|
126
133
|
report += `\n`
|
|
127
134
|
}
|
|
135
|
+
durations[msg] = duration;
|
|
128
136
|
}
|
|
129
137
|
console.log(report)
|
|
138
|
+
return { milestones, durations };
|
|
130
139
|
}
|
|
131
|
-
|
|
140
|
+
return undefined;
|
|
132
141
|
}
|
|
133
142
|
(function () {
|
|
134
143
|
init()
|