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.
@@ -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
- perfReportLogged = true
140
+ return undefined;
132
141
  }
133
142
  (function () {
134
143
  init()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "9.2.6",
3
+ "version": "9.2.7",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",