This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
contract SimpleBank { | |
mapping (address => uint) private balances; | |
address public owner; | |
constructor() public { | |
owner = msg.sender; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Loadable from 'react-loadable'; | |
export const LazyListComponent = Loadable({ | |
loader: () => import(/* webpackChunkName: "listComponent" */ './ListComponent'), | |
loading: () => null, | |
delay: 300, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const perfume = new Perfume({ | |
firstPaint: true | |
}); | |
// ⚡️ Perfume.js: First Contentful Paint 1482.00 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script src="perfume.js"></script> | |
<style>body { background: #f2db77; ... } .progress { ... }</style> | |
</head> | |
<body> | |
... | |
<script> | |
const perfume = new Perfume({ | |
timeToInteractive: true, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script> | |
!function(){if('PerformanceLongTaskTiming' in window){var g=window.__tti={e:[]}; | |
g.o=new PerformanceObserver(function(l){g.e=g.e.concat(l.getEntries())}); | |
g.o.observe({entryTypes:['longtask']})}}(); | |
</script> | |
<style>body { background: #f2db77; ... } .progress { ... }</style> | |
</head> | |
<body>...</body> | |
<script src="tti-polyfill.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script> | |
const perfObserver = new PerformanceObserver((entryList) => { | |
console.log(...entryList.getEntries()); | |
}); | |
perfObserver.observe({entryTypes: ["paint"]}); | |
</script> | |
<style>body { background: #f2db77; ... }</style> | |
</head> | |
<body></body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script src="perfume.js"></script> | |
<style>body { background: #f2db77; ... }</style> | |
</head> | |
<body></body> | |
<script> | |
const perfume = new Perfume({ | |
firstPaint: true, | |
firstContentfulPaint: true, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const performancePaintTiming = { | |
name: "first-contentful-paint", | |
entryType: "paint", | |
startTime: 1030.3000000021711, | |
duration: 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const performancePaintTiming = { | |
name: "first-paint", | |
entryType: "paint", | |
startTime: 431.10000000160653, | |
duration: 0 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const perfObserver = new PerformanceObserver((performanceEntryList) => { | |
for (const performanceEntry of performanceEntryList.getEntries()) { | |
console.log(performanceEntry.name); // 'first-paint' or 'first-contentful-paint' | |
console.log(performanceEntry.startTime); // DOMHighResTimeStamp | |
} | |
}); | |
perfObserver.observe({ entryTypes: ["paint"] }); |
NewerOlder