diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/www/messagebus.js | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) | |
download | ydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/www/messagebus.js')
-rw-r--r-- | library/cpp/messagebus/www/messagebus.js | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/library/cpp/messagebus/www/messagebus.js b/library/cpp/messagebus/www/messagebus.js index e30508b879..2781f47df3 100644 --- a/library/cpp/messagebus/www/messagebus.js +++ b/library/cpp/messagebus/www/messagebus.js @@ -1,48 +1,48 @@ -function logTransform(v) { - return Math.log(v + 1); -} - -function plotHist(where, hist) { +function logTransform(v) { + return Math.log(v + 1); +} + +function plotHist(where, hist) { var max = hist.map(function(x) {return x[1]}).reduce(function(x, y) {return Math.max(x, y)}); - - var ticks = []; - for (var t = 1; ; t *= 10) { - if (t > max) { - break; - } - ticks.push(t); - } - - $.plot(where, [hist], - { - data: hist, - series: { - bars: { - show: true, - barWidth: 0.9 - } - }, - xaxis: { - mode: 'categories', - tickLength: 0 - }, - yaxis: { - ticks: ticks, - transform: logTransform - } - } - ); -} - -function plotQueueSize(where, data, ticks) { - $.plot(where, [data], - { - xaxis: { - ticks: ticks, - }, - yaxis: { - //transform: logTransform - } - } - ); -} + + var ticks = []; + for (var t = 1; ; t *= 10) { + if (t > max) { + break; + } + ticks.push(t); + } + + $.plot(where, [hist], + { + data: hist, + series: { + bars: { + show: true, + barWidth: 0.9 + } + }, + xaxis: { + mode: 'categories', + tickLength: 0 + }, + yaxis: { + ticks: ticks, + transform: logTransform + } + } + ); +} + +function plotQueueSize(where, data, ticks) { + $.plot(where, [data], + { + xaxis: { + ticks: ticks, + }, + yaxis: { + //transform: logTransform + } + } + ); +} |