add some piggy-backed counters to improve reliability

This commit is contained in:
Andrew Dolgov 2008-05-21 05:19:03 +01:00
parent 9922d56bbe
commit 06c88b8dc3
2 changed files with 8 additions and 5 deletions

View File

@ -210,11 +210,11 @@
} }
} }
/* if ($mode != "prefetch_old") { if ($mode != "prefetch_old") {
print "<counters>"; print "<counters>";
getAllCounters($link, $omode); getAllCounters($link, $omode);
print "</counters>"; print "</counters>";
} */ }
print "</reply>"; print "</reply>";
break; // view break; // view
@ -288,11 +288,11 @@
if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info); if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
/* if (time() - $_SESSION["get_all_counters_stamp"] > 300) { if (time() - $_SESSION["get_all_counters_stamp"] > 300) {
print "<counters>"; print "<counters>";
getAllCounters($link, $omode, $feed); getAllCounters($link, $omode, $feed);
print "</counters>"; print "</counters>";
} */ }
if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info); if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info);

View File

@ -503,6 +503,9 @@ function mouse_up_handler(e) {
function request_counters_real() { function request_counters_real() {
try { try {
debug("requesting counters...");
var query = "backend.php?op=rpc&subop=getAllCounters"; var query = "backend.php?op=rpc&subop=getAllCounters";
if (tagsAreDisplayed()) { if (tagsAreDisplayed()) {
@ -535,7 +538,7 @@ function request_counters() {
if (timestamp - counters_last_request > 10) { if (timestamp - counters_last_request > 10) {
debug("scheduling request of counters..."); debug("scheduling request of counters...");
window.setTimeout("request_counters_real()", 100); window.setTimeout("request_counters_real()", 1000);
counters_last_request = timestamp; counters_last_request = timestamp;
} else { } else {
debug("request_counters: rate limit reached: " + (timestamp - counters_last_request)); debug("request_counters: rate limit reached: " + (timestamp - counters_last_request));