Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CitusDB for analytics tables Merge with 2.42/master (#14945) [DHIS2-15548] #17099

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c088dc0
fix: Merge with 2.42/master [DHIS2-15548]
maikelarabori Apr 9, 2024
c271dd2
fix: Missing javadocs + clean-up [DHIS2-15548]
maikelarabori Apr 9, 2024
36555d5
fix: Table inherits condition [DHIS2-15548]
maikelarabori Apr 9, 2024
f9b2378
refactor: Code clean-up + revert method extraction [DHIS2-15548]
maikelarabori Apr 9, 2024
2570148
fix: Code formatting [DHIS2-15548]
maikelarabori Apr 9, 2024
2c5ea6f
refactor: Remove cistus flag from params [DHIS2-15548]
maikelarabori Apr 10, 2024
59c18e0
refactor: Remove distributed flag get/setter [DHIS2-15548]
maikelarabori Apr 10, 2024
38512b3
refactor: False is set by default [DHIS2-15548]
maikelarabori Apr 10, 2024
94bfdef
fix: Code formatting [DHIS2-15548]
maikelarabori Apr 10, 2024
5e88e74
fix: Merge conflicts with master [DHIS2-15548]
maikelarabori Apr 10, 2024
79c012b
fix: Unit test [DHIS2-15548]
maikelarabori Apr 10, 2024
93b6f1f
fix: Code formatting [DHIS2-15548]
maikelarabori Apr 10, 2024
4554321
Merge branch 'master' into DHIS2-15548_2.42
maikelarabori Apr 10, 2024
774b73d
refactor: Use enum instead of boolean flag [DHIS2-15548]
maikelarabori Apr 11, 2024
32c6651
refactor: Use text blocks [DHIS2-15548]
maikelarabori Apr 11, 2024
9ddd12e
Merge branch 'master' of github.com:dhis2/dhis2-core into DHIS2-15548…
maikelarabori Apr 11, 2024
cd993aa
refactor: Small clean-up [DHIS2-15548]
maikelarabori Apr 11, 2024
6fa335c
fix: Unit test [DHIS2-15548]
maikelarabori Apr 11, 2024
a605daa
Merge branch 'master' into DHIS2-15548_2.42
maikelarabori Apr 15, 2024
ffcceb3
Merge branch 'master' into DHIS2-15548_2.42
maikelarabori Apr 24, 2024
afa8d9a
fix: Conflicts with master [DHIS2-15548]
maikelarabori May 31, 2024
55d16a0
fix: Code formatting [DHIS2-15548]
maikelarabori May 31, 2024
b2498d6
Merge remote-tracking branch 'refs/remotes/origin/master' into DHIS2-…
gnespolino Jul 15, 2024
1840cf9
fix: fixing conflict when merging master [DHIS2-15548]
gnespolino Jul 15, 2024
3caa711
fix: renaming citus property [DHIS2-15548]
gnespolino Jul 15, 2024
f321eaf
fix: fix skip partitions when citus is enabled [DHIS2-15548]
gnespolino Jul 17, 2024
573fe21
fix: unit test [DHIS2-15548]
gnespolino Jul 17, 2024
095f38f
Merge remote-tracking branch 'refs/remotes/origin/master' into DHIS2-…
gnespolino Jul 26, 2024
02abff2
fix: tei table column name
gnespolino Jul 29, 2024
67621d9
Merge branch 'master' into DHIS2-15548_2.42
gnespolino Jul 31, 2024
3395ef4
fix: enrollment and event table column name [DHIS2-15548]
gnespolino Jul 31, 2024
e1c742b
fix: fixing TE queries which failed when citus is enabled [DHIS2-15548]
gnespolino Aug 1, 2024
0bd08be
fix: failing unit tests [DHIS2-15548]
gnespolino Aug 2, 2024
5ebbca5
Merge branch 'master' into DHIS2-15548_2.42
gnespolino Aug 2, 2024
92ac602
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Sep 24, 2024
88cfc1d
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Sep 30, 2024
96c2e1c
fix: added distribution to Enrollment/Event/Analytics [DHIS2-15548]
gnespolino Sep 30, 2024
7d2af77
fix: added distribution to Enrollment/Event/Analytics [DHIS2-15548]
gnespolino Sep 30, 2024
bf7d2b8
fix: added distribution to Enrollment/Event/Analytics [DHIS2-15548]
gnespolino Sep 30, 2024
608f68e
fix: tests [DHIS2-15548]
gnespolino Sep 30, 2024
f8ed267
feat: skip citus dynamically [DHIS2-18134] (#18720)
gnespolino Oct 3, 2024
651f3be
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Oct 8, 2024
46cdaff
chore: fixing merge conflicts [DHIS2-15548]
gnespolino Oct 8, 2024
24d0b0e
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Oct 11, 2024
4619398
chore: fixing unit tests [DHIS2-15548]
gnespolino Oct 11, 2024
ad1f41d
test: tagging slow analytics query
gnespolino Nov 5, 2024
2ddd1fe
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Nov 5, 2024
b1ca045
perf: performance analysis
gnespolino Nov 19, 2024
014b2a8
Merge remote-tracking branch 'origin/master' into DHIS2-15548_2.42
gnespolino Nov 19, 2024
6c29732
style: format
gnespolino Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,371 changes: 1,371 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/index.html

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/all_sessions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
allUsersData = {

color: '#FFA900',
name: 'Active Users',
data: [
[1732018236000,7],[1732018237000,7],[1732018238000,7],[1732018239000,7],[1732018240000,7],[1732018241000,9],[1732018242000,7],[1732018243000,9],[1732018244000,7],[1732018245000,8],[1732018246000,7],[1732018247000,8],[1732018248000,9],[1732018249000,7],[1732018250000,7],[1732018251000,7],[1732018252000,7],[1732018253000,7],[1732018254000,7],[1732018255000,7],[1732018256000,7],[1732018257000,7],[1732018258000,7],[1732018259000,3],[1732018260000,2],[1732018261000,1]
],
tooltip: { yDecimals: 0, ySuffix: '', valueDecimals: 0 }
, zIndex: 20
, yAxis: 1
};
86 changes: 86 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/assertions.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/bootstrap.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/ellipsis.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function parentId(name) {
return "parent-" + name;
}

function isEllipsed(name) {
const child = document.getElementById(name);
const parent = document.getElementById(parentId(name));
const emptyData = parent.getAttribute("data-content") === "";
const hasOverflow = child.clientWidth < child.scrollWidth;

if (hasOverflow) {
if (emptyData) {
parent.setAttribute("data-content", name);
}
} else {
if (!emptyData) {
parent.setAttribute("data-content", "");
}
}
}

function ellipsedLabel ({ name, parentClass = "", childClass = "" }) {
const child = "<span onmouseover='isEllipsed(\"" + name + "\")' id='" + name + "' class='ellipsed-name " + childClass + "'>" + name + "</span>";

return "<span class='" + parentClass + "' id='" + parentId(name) + "' data-toggle='popover' data-placement='right' data-container='body' data-content=''>" + child + "</span>";
}
137 changes: 137 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/gatling.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/*
* Copyright 2011-2024 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function ($) {
$.fn.expandable = function () {
var scope = this;

this.find('.expand-button:not([class*=hidden])').addClass('collapse').on('click', function () {
var $this = $(this);

if ($this.hasClass('expand'))
$this.expand(scope);
else
$this.collapse(scope);
});

this.find('.expand-all-button').on('click', function () {
$(this).expandAll(scope);
});

this.find('.collapse-all-button').on('click', function () {
$(this).collapseAll(scope);
});

this.collapseAll(this);

return this;
};

$.fn.expand = function (scope, recursive) {
return this.each(function () {
var $this = $(this);

if (recursive) {
scope.find('*[data-parent=' + $this.attr('id') + ']').find('.expand-button.expand').expand(scope, true);
scope.find('*[data-parent=' + $this.attr('id') + ']').find('.expand-button.expand').expand(scope, true);
}

if ($this.hasClass('expand')) {
$('*[data-parent=' + $this.attr('id') + ']').toggle(true);
$this.toggleClass('expand').toggleClass('collapse');
}
});
};

$.fn.expandAll = function (scope) {
$('*[data-parent=ROOT]').find('.expand-button.expand').expand(scope, true);
$('*[data-parent=ROOT]').find('.expand-button.collapse').expand(scope, true);
};

$.fn.collapse = function (scope) {
return this.each(function () {
var $this = $(this);

scope.find('*[data-parent=' + $this.attr('id') + '] .expand-button.collapse').collapse(scope);
scope.find('*[data-parent=' + $this.attr('id') + ']').toggle(false);
$this.toggleClass('expand').toggleClass('collapse');
});
};

$.fn.collapseAll = function (scope) {
$('*[data-parent=ROOT]').find('.expand-button.collapse').collapse(scope);
};

$.fn.sortable = function (target) {
var table = this;

this.find('thead .sortable').on('click', function () {
var $this = $(this);

if ($this.hasClass('sorted-down')) {
var desc = false;
var style = 'sorted-up';
}
else {
var desc = true;
var style = 'sorted-down';
}

$(target).sortTable($this.attr('id'), desc);

table.find('thead .sortable').removeClass('sorted-up sorted-down');
$this.addClass(style);

return false;
});

return this;
};

$.fn.sortTable = function (col, desc) {
function getValue(line) {
var cell = $(line).find('.' + col);

if (cell.hasClass('value'))
var value = cell.text();
else
var value = cell.find('.value').text();

return parseFloat(value);
}

function sortLines (lines, group) {
var notErrorTable = col.search("error") == -1;
var linesToSort = notErrorTable ? lines.filter('*[data-parent=' + group + ']') : lines;

var sortedLines = linesToSort.sort(function (a, b) {
return desc ? getValue(b) - getValue(a): getValue(a) - getValue(b);
}).toArray();

var result = [];
$.each(sortedLines, function (i, line) {
result.push(line);
if (notErrorTable)
result = result.concat(sortLines(lines, $(line).attr('id')));
});

return result;
}

this.find('tbody').append(sortLines(this.find('tbody tr').detach(), 'ROOT'));

return this;
};
})(jQuery);
77 changes: 77 additions & 0 deletions dhis-2/citus-doc/gatling/CITUS-2-nodes/js/global_stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "All Requests",
"numberOfRequests": {
"total": 15,
"ok": 15,
"ko": 0
},
"minResponseTime": {
"total": 5958,
"ok": 5958,
"ko": 0
},
"maxResponseTime": {
"total": 25165,
"ok": 25165,
"ko": 0
},
"meanResponseTime": {
"total": 10868,
"ok": 10868,
"ko": 0
},
"standardDeviation": {
"total": 4951,
"ok": 4951,
"ko": 0
},
"percentiles1": {
"total": 9935,
"ok": 9935,
"ko": 0
},
"percentiles2": {
"total": 13464,
"ok": 13464,
"ko": 0
},
"percentiles3": {
"total": 17974,
"ok": 17974,
"ko": 0
},
"percentiles4": {
"total": 23727,
"ok": 23727,
"ko": 0
},
"group1": {
"name": "t < 800 ms",
"htmlName": "t < 800 ms",
"count": 0,
"percentage": 0.0
},
"group2": {
"name": "800 ms <= t < 1200 ms",
"htmlName": "t >= 800 ms <br> t < 1200 ms",
"count": 0,
"percentage": 0.0
},
"group3": {
"name": "t >= 1200 ms",
"htmlName": "t >= 1200 ms",
"count": 15,
"percentage": 100.0
},
"group4": {
"name": "failed",
"htmlName": "failed",
"count": 0,
"percentage": 0.0
},
"meanNumberOfRequestsPerSecond": {
"total": 0.5769230769230769,
"ok": 0.5769230769230769,
"ko": 0
}
}
Loading
Loading