Last active
November 6, 2017 05:23
-
-
Save DerayGa/4c272af302cf46b967739253719d4178 to your computer and use it in GitHub Desktop.
print phpmyadmin process time
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
| 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