Add timer to measure performance of fetch method in Get Started documentation

pull/18514/head
Paul Rey 2024-04-06 12:39:13 +02:00 committed by GitHub
parent 4ae55e3bdb
commit 6f84496742
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -32,9 +32,11 @@ All you need is Docker (or similarly compatible) container or a Virtual Machine
"Windows/x86-64"
];
console.time("timerReleaseFetch");
fetch('https://api.github.com/repos/kubernetes/minikube/releases')
.then((response) => response.json())
.then((releases) => {
console.timeEnd("timerReleaseFetch");
if (releases && releases.length > 0 && releases[0] && releases[0].tag_name) {
const isBetaMostRecent = releases[0].tag_name.includes("-beta");