Changeset 96222 in webkit
- Timestamp:
- Sep 28, 2011 7:30:54 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96219 r96222 1 2011-09-28 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: It'd be useful to have performance stats for the back-end to front-end communication channel. 4 https://bugs.webkit.org/show_bug.cgi?id=69002 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/CodeGeneratorInspector.pm: 9 1 10 2011-09-27 Pavel Podivilov <podivilov@chromium.org> 2 11 -
trunk/Source/WebCore/inspector/CodeGeneratorInspector.pm
r95632 r96222 777 777 778 778 InspectorBackendStub.prototype = { 779 dumpInspectorTimeStats: 0, 780 dumpInspectorProtocolMessages: 0, 781 779 782 _wrap: function(callback) 780 783 { … … 850 853 _wrapCallbackAndSendMessageObject: function(messageObject, callback) 851 854 { 852 messageObject.id = this._wrap(callback || function() {}); 853 854 if (window.dumpInspectorProtocolMessages) 855 messageObject.id = this._wrap(callback); 856 857 if (this.dumpInspectorTimeStats) { 858 var wrappedCallback = this._callbacks[messageObject.id]; 859 wrappedCallback.methodName = messageObject.method; 860 wrappedCallback.sendRequestTime = Date.now(); 861 } 862 863 if (this.dumpInspectorProtocolMessages) 855 864 console.log("frontend: " + JSON.stringify(messageObject)); 856 865 … … 873 882 dispatch: function(message) 874 883 { 875 if ( window.dumpInspectorProtocolMessages)884 if (this.dumpInspectorProtocolMessages) 876 885 console.log("backend: " + ((typeof message === "string") ? message : JSON.stringify(message))); 877 886 … … 917 926 var callback = this._callbacks[messageObject.id]; 918 927 if (callback) { 928 var processingStartTime; 929 if (this.dumpInspectorTimeStats && callback.methodName) 930 processingStartTime = Date.now(); 931 919 932 arguments.unshift(messageObject.error); 920 933 callback.apply(null, arguments); 921 934 --this._pendingResponsesCount; 922 935 delete this._callbacks[messageObject.id]; 936 937 if (this.dumpInspectorTimeStats && callback.methodName) 938 console.log("time-stats: " + callback.methodName + " = " + (processingStartTime - callback.sendRequestTime) + " + " + (Date.now() - processingStartTime)); 923 939 } 924 940 … … 953 969 } 954 970 971 var processingStartTime; 972 if (this.dumpInspectorTimeStats) 973 processingStartTime = Date.now(); 974 955 975 dispatcher[functionName].apply(dispatcher, params); 976 977 if (this.dumpInspectorTimeStats) 978 console.log("time-stats: " + messageObject.method + " = " + (Date.now() - processingStartTime)); 956 979 } 957 980 },
Note: See TracChangeset
for help on using the changeset viewer.