<div id="info"></div>
<div class="text">
<br/>
Enter JSON information that you get from other pages in this field to show breakup...
<br/>
Type below code in console of other browser and copy text and paste that text in the field
<br/>
<pre> JSON.stringify(performance.timing);</pre>
<br/>
</div>
<textarea id="jsoninfo"></textarea >
<input type="button" id="submit" value="Submit"></input>
// JS Code
function sortObject(obj) {
var arr = [];
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
arr.push({
'key': prop,
'value': obj[prop]
});
}
}
arr.sort(function(a, b) { return a.value - b.value; });
return arr;
}
function showPerformance(object){
var timing;
if(!object) {
timing = performance.timing;
} else {
timing = object;
}
var objectKeys = ["connectStart", "connectEnd", "domainLookupStart", "domainLookupEnd", "fetchStart", "redirectStart", "redirectEnd", "requestStart", "responseStart", "domLoading", "unloadEventStart", "unloadEventEnd", "responseEnd", "domInteractive", "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete", "loadEventStart", "loadEventEnd"];
var objectInfo = {
'connectStart': 'Time just before server connection begins.',
'connectEnd': 'Time when server connection is finished.',
'domainLookupStart': 'Time just before domain name lookup.',
'domainLookupEnd': 'Time after domain name lookup.',
'fetchStart': 'Time when the resource starts being fetched.',
'redirectStart': 'Time of fetch that initiated a redirect.',
'redirectEnd': 'Time after last redirect response ends.',
'requestStart': 'Time just before a server request.',
'responseStart': 'Time just before the start of a response.',
'domLoading': 'Time just before readiness set to loading.',
'unloadEventStart': 'Time just before the unload event is fired.',
'unloadEventEnd': 'Time after the previous document is unloaded.',
'responseEnd': 'Time after the end of a response or connection.',
'domInteractive': 'Time just before readiness set to interactive.',
'domContentLoadedEventStart': 'Time just before DOMContentLoaded starts.',
'domContentLoadedEventEnd': 'Time after...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.