Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for fetching callback execution time of asynchronous request of user

A technology of asynchronous request and execution time, applied in the fields of instruments, electrical digital data processing, hardware monitoring, etc., it can solve the problem that the callback of asynchronous requests is not good, and achieve the effect of good experience and performance improvement.

Active Publication Date: 2017-03-22
杭州优云软件有限公司 +1
View PDF2 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

On the other hand, with the popularity of web applications, there are more and more single-page applications, all of which use asynchronous requests to update pages, and the performance of asynchronous requests needs to be paid more and more attention. For monitoring and optimization, the industry does not have a good solution for capturing the execution time of asynchronous request callbacks. Although this time is relatively short, it is still necessary to show this time to the user in terms of increasing user experience. user, allowing the user to do further analysis; in view of this, the present invention is proposed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for fetching callback execution time of asynchronous request of user
  • Method for fetching callback execution time of asynchronous request of user
  • Method for fetching callback execution time of asynchronous request of user

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0014] The present invention will be further elaborated below by means of drawings and specific embodiments. Examples will help to better understand the present invention, but the present invention is not limited only to the following examples.

[0015] As shown in the figure, the present invention is mainly based on the principle of single thread (there is only one section of execution code at the same time), when an asynchronous callback function is executed, immediately add a zero timer, and the callback in this timer will be Put it in the queue and push it into the main thread for execution immediately when the js main thread is idle, so it is guaranteed that the code in the timer will be executed immediately after the callback function code is executed. From callback execution start-callback execution-timer execution (callback end), these times are on the same line, and the end of the callback is marked by the execution of the timer, and the required time is calculated in ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the field of Internet monitoring, in particular to a method for fetching the callback execution time of the asynchronous request of a user. The method is used for monitoring time spent when the callback function code of the asynchronous request (Ajax) in a webpage is executed, and is convenient for analyzing the performance of the asynchronous request. According to a principle of a single thread, when an asynchronous callback function is executed, a timer which is set to be zero is immediately added, the callback in the timer can be put in a queue, and is immediately pushed into a main thread to be executed when the js (JavaScript) main thread is idle, and codes in the timer are immediately executed when the callback function code finishes being executed. The time of callback execution beginning to callback execution to timer execution is on the same line, callback end is identified through the execution of the timer, and required time is calculated.

Description

technical field [0001] The invention relates to the field of Internet web performance monitoring, in particular to a method for capturing user asynchronous request callback execution time. Background technique [0002] Before the present invention, the current upgrades of major browsers have been continuously optimized for performance improvement, and users are becoming more and more sensitive to experience. Many products have begun to pay attention to user experience, and many user experience monitoring has appeared. Products, such as foreign newrelic, dynatrace, and domestic uyun (Youyun), oneapm, etc. As a front-end developer, the focus is on web performance. The performance measurement of the Web can be roughly divided into two parts, one part is the loading time of the page and external resources, and the other part is the display time during the interaction between the user and the page. The first part has many corresponding optimization solutions, such as cdn, css s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/32G06F11/30
CPCG06F11/302G06F11/328
Inventor 刘鹏王川林刘东海
Owner 杭州优云软件有限公司