Aren't these just some random numbers that they pull out of the air?
Aren't these just some random numbers that they pull out of the air?
var kd = function () {
function a() {
e = e || Q("number_of_seconds");
d = d || Q("searches_count_num");
f = f || Q("searches_count_unit");
var a = ~~ (((new Date).getTime() - h) / 1E3 % 86400),
k = a * b + "";
f.innerHTML = " " + c[Math.ceil(k.length / 3)] || "";
e.innerHTML = a;
d.innerHTML = k.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")
}
var b = ~~ (1E11 / 2592E3),
c = " hundred thousand million billion trillion quadrillion quintillion sextillion septillion octillion nonillion decillion undecillion duodecillion tredecillion quattuordecillion quindecillion sexdecillion septendecillion octodecillion novemdecillion vigintillion".split(" "),
e, d, f, h = (new Date).getTime();
return {
hc: a,
rb: function () {
a();
setInterval(a, 100)
}
}
}();
It's just running on an interval and doing in-page calculations, so it's entirely estimated. The value of "b" in this function evaluates to a little over 38,000 (https://www.google.com/search?q=1E11+%2F+2592E3) which they're using as the basis for the calculation.I don't think so. It seems logical that Google's been keeping statistics about this sort of thing, so it doesn't surprise me that they keep track of such things as 'average queries per second'.
Google search results show a time value for each search. E.g.: About 2,210,000,000 results (0.12 seconds). Is this time machine time per search? This number is often around 30 ms, give or take a factor of two. If so, each machine can handle about 30 searches per second. If so, 38K searches per second need about 1000 machines. Sounds a bit too low... so my interpretation must be wrong at least somewhere.
Since all of those queries are fired at the same time, the only metric that matters at the end is the wall time, not the CPU time used during the query.
I also seriously doubt that the servers that handle the Google front page can only do one query at a time; at the very least, they're multithreaded, but probably concurrent. It probably works as below:
1. Parse query 2. Send query to backend servers 3. Wait until all backends replied or at most 250ms (or some other timeout) 4. Assemble the result page and ship it back to the client
While the server is idling for the backends to reply, it probably processes other queries; it wouldn't make sense to waste that much CPU power.
Finally, your example says 0.12s (a random query on my end gave a response time of 0.69s), which is 120ms (or 690ms for mine), which is more than twice 30ms.
function a() {
e = e || Q("number_of_seconds");
d = d || Q("searches_count_num");
f = f || Q("searches_count_unit");
var a = ~~ (((new Date).getTime() - h) / 1E3 % 86400),
k = a * b + "";
f.innerHTML = " " + c[Math.ceil(k.length / 3)] || "";
e.innerHTML = a;
d.innerHTML = k.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")
}
var b = ~~ (1E11 / 2592E3),
So yes.