Skip to content

Commit

Permalink
Remove measuring code
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonE committed Feb 22, 2020
1 parent 6b9a35b commit c2505f9
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions config/jsdoc/api/template/static/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,25 +210,13 @@ $(function () {
const searchInput = $('#search').get(0);
// Skip searches when typing fast.
let key;
let start;
const brandNode = document.querySelector('.brand');
function queueSearch() {
if (!key) {
start = Date.now();
key = setTimeout(function () {
key = undefined;

const searchTerm = searchInput.value;
doSearch(searchTerm);

const time = Date.now() - start
brandNode.innerHTML = time + ' ms';
const msg = [searchTerm + ':', time, 'ms'];
if (searchTerm.length >= minInputForSearch) {
msg.push(search.lastState);
}
console.log.apply(console, msg);
start = undefined;
}, 0);
}
}
Expand Down

0 comments on commit c2505f9

Please sign in to comment.