Skip to content

Instantly share code, notes, and snippets.

@DerayGa
Last active November 6, 2017 05:23
Show Gist options
  • Select an option

  • Save DerayGa/4c272af302cf46b967739253719d4178 to your computer and use it in GitHub Desktop.

Select an option

Save DerayGa/4c272af302cf46b967739253719d4178 to your computer and use it in GitHub Desktop.
print phpmyadmin process time
function showSpendTimeByID(id) {
const table = $('table#tableprocesslist');
let spendTime;
function getSpendTime() {
const td = $('tr td.value', table);
let refresh = false;
$.each(td, (idx, value) => {
if ($(value).text() == id) {
spendTime = $(td[idx + 1]).text();
refresh = true;
return false;
}
});
console.log(`Process ID ${id} : ${spendTime}`);
if (refresh) {
setTimeout(function() {
getSpendTime();
}, 3000);
}
}
if (table) {
getSpendTime();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment