[perf-web] Handle duplication of times when merging incoming data
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perf-web] Handle duplication of times when merging incoming data
- Date: Wed, 23 Jul 2014 00:38:03 +0000 (UTC)
commit 7319e4d16a076dbe6c83f28c600c210f65a01f56
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Jun 29 15:22:36 2014 -0400
Handle duplication of times when merging incoming data
In some edge cases - if we're expecting to discard data but don't
because API calls fail, for example - we might try to merge old and
new data sets with identical points. In that case, don't duplicate
data for the times.
static/main.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/static/main.js b/static/main.js
index f3bb4dc..d7db7c9 100644
--- a/static/main.js
+++ b/static/main.js
@@ -42,6 +42,10 @@ ValueBuffer.prototype.merge = function(other) {
} else {
newData[newPos] = other.data[otherPos];
newData[newPos + 1] = other.data[otherPos + 1];
+ if (this.data[thisPos] == other.data[otherPos]) {
+ thisPos += 2;
+ newLength--;
+ }
otherPos += 2;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]