Skip to content

Commit e20d485

Browse files
authored
README.md
ReadMe file for detailed explaination of the code
1 parent 4bb3e9d commit e20d485

File tree

1 file changed

+17
-0
lines changed
  • Server-Side Components/Background Scripts/Console timing API

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
**This can be used in Yokohama++ instances**
2+
3+
As part of Yokohama release the problem of logging and calculating time taken by a piece of script has been addressesed by bringing standardized timing tools to the platform, enabling precise performance analysis with minimal effort and developers can isolate slow operations.
4+
5+
Use Case: Query overall incident record and bulk update with specific values. Need time taken for query and update.
6+
7+
8+
​console.time(label)
9+
Starts a timer with a unique label. Use this at the beginning of a code block you want to measure.
10+
11+
​console.timeLog(label, [data])
12+
Logs the current duration of the timer without stopping it. Optional data can be appended for context.
13+
14+
​console.timeEnd(label)
15+
Stops the timer and logs the total execution time.
16+
17+
ServiceNow Documentation: https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_reference/Console/concept/ConsoleAPI.html

0 commit comments

Comments
 (0)