You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,6 +235,39 @@ call | `Boolean` | determine whether invoke when exports is funct
235
235
inject | `Object` | an object that be the argument when invoke the function
236
236
filter | `Function` | a function that filter the exports which can be loaded
237
237
238
+
## Timing
239
+
240
+
EggCore record boot progress with `Timing`, include:
241
+
- Process start time
242
+
- Script start time(node don't implement an interface like `process.uptime` to record the script start running time, framework can implement a prestart file used with node `--require` options to set `process.scriptTime`)
243
+
- Application start time
244
+
- Load duration
245
+
-`require` duration
246
+
247
+
### start
248
+
249
+
Start record a item. If the item exits, end the old one and start a new one.
250
+
251
+
- {String} name - record item name
252
+
- {Number} [start] - record item start time, default is Date.now()
253
+
254
+
### end
255
+
256
+
End a item.
257
+
258
+
- {String} name - end item name
259
+
260
+
### toJSON
261
+
262
+
Generate all record items to json
263
+
264
+
- {String} name - record item name
265
+
- {Number} start - item start time
266
+
- {Number} end - item end time
267
+
- {Number} duration - item duration
268
+
- {Number} pid - pid
269
+
- {Number} index - item index
270
+
238
271
## Questions & Suggestions
239
272
240
273
Please open an issue [here](https://github.com/eggjs/egg/issues).
0 commit comments