Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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

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

2 changes: 1 addition & 1 deletion app/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.5da079fa.css" rel="preload" as="style"><link href="/css/chunk-vendors.153776a4.css" rel="preload" as="style"><link href="/js/app.9576c760.js" rel="preload" as="script"><link href="/js/chunk-vendors.04feed4f.js" rel="preload" as="script"><link href="/css/chunk-vendors.153776a4.css" rel="stylesheet"><link href="/css/app.5da079fa.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.04feed4f.js"></script><script src="/js/app.9576c760.js"></script></body></html>
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>CallFlow</title><link href="/css/app.61054b09.css" rel="preload" as="style"><link href="/css/chunk-vendors.153776a4.css" rel="preload" as="style"><link href="/js/app.a978f178.js" rel="preload" as="script"><link href="/js/chunk-vendors.04feed4f.js" rel="preload" as="script"><link href="/css/chunk-vendors.153776a4.css" rel="stylesheet"><link href="/css/app.61054b09.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.04feed4f.js"></script><script src="/js/app.a978f178.js"></script></body></html>
2 changes: 0 additions & 2 deletions app/dist/js/app.9576c760.js

This file was deleted.

1 change: 0 additions & 1 deletion app/dist/js/app.9576c760.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions app/dist/js/app.a978f178.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/dist/js/app.a978f178.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export default {
groupBy: "module",
numOfClusters: this.$store.selectedNumOfClusters,
});
console.debug("[/projection] data: ", data);
data = JSON.parse(data);
console.debug("[/projection] data: ", data);
this.visualize(data);
},

Expand Down
21 changes: 7 additions & 14 deletions app/src/components/singleHistogram/singleHistogram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,33 +82,25 @@ export default {
this.rankScaleHeight = this.boxHeight - this.histogramHeight;
this.rankScaleWidth = this.histogramWidth;

this.xAxisHeight =
this.histogramWidth - (this.paddingFactor - 1.5) * this.padding.left;
this.yAxisHeight =
this.histogramHeight - (this.paddingFactor - 1.5) * this.padding.left;
this.xAxisHeight = this.histogramWidth - (this.paddingFactor - 1.5) * this.padding.left;
this.yAxisHeight = this.histogramHeight - (this.paddingFactor - 1.5) * this.padding.left;

this.svg = d3.select("#" + this.svgID).attrs({
width: this.boxWidth,
height: this.boxHeight,
transform:
"translate(" + this.padding.left + "," + this.padding.top + ")",
transform: "translate(" + this.padding.left + "," + this.padding.top + ")",
});

EventHandler.$emit("single-histogram", {
module: Object.keys(
this.$store.modules[this.$store.selectedTargetDataset]
)[0],
module: Object.keys(this.$store.modules[this.$store.selectedTargetDataset])[0],
groupBy: this.$store.selectedGroupBy,
dataset: this.$store.selectedTargetDataset,
});
},

setupScale(callsite) {
let store = this.$store.modules[this.$store.selectedTargetDataset][
callsite
];
let data =
store[this.$store.selectedMetric]["prop_histograms"]["rank"]["target"];
let store = this.$store.modules[this.$store.selectedTargetDataset][callsite];
let data = store[this.$store.selectedMetric]["prop_histograms"]["rank"]["target"];
let mpiData = store[this.$store.selectedMetric]["data"];

let temp = this.dataProcess(data, mpiData);
Expand Down Expand Up @@ -146,6 +138,7 @@ export default {
d3.selectAll(".binRank").remove();
d3.selectAll(".lineRank").remove();
d3.selectAll(".brush").remove();
d3.selectAll(".tick").remove();
this.$refs.ToolTip.clear();
},

Expand Down
12 changes: 10 additions & 2 deletions app/src/components/supergraph/encodings/tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ export default {


// TODO : Improve the logic here to not process the string input multiple times.
let entry_functions = node[this.$store.selectedTargetDataset]["entry_function"].split(",").map(String);
let entry_functions = [];
if(this.$store.selectedMode !== "Ensemble") {
entry_functions = node[this.$store.selectedTargetDataset]["entry_function"].split(",").map(String);
}
else {
entry_functions = node["ensemble"]["entry_function"].split(",").map(String);
}
let entry_function_runtimes = {};
for (let i = 0; i < entry_functions.length; i += 1) {
let callsite = entry_functions[i].replace("'", "").replace("'", "").replace("[", "").replace("]", "").replace(" ", "");
Expand Down Expand Up @@ -260,7 +266,9 @@ export default {
}

let left_callsites = entry_function_data.length - 3;
this.addText("and " + left_callsites + " call sites more.");
if (left_callsites > 0) {
this.addText("and " + left_callsites + " call sites more.");
}
},


Expand Down
126 changes: 34 additions & 92 deletions app/src/components/supergraph/supergraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ export default {
treeHeight: null,
data: null,
message: "Summary Graph View",
debug: false,
sankeyWidth: 0,
sankeyHeight: 0,
summaryChip: "SuperGraph",
selectedMetric: "",
existingIntermediateNodes: {},
}),

mounted() {
Expand Down Expand Up @@ -122,18 +122,16 @@ export default {
// check cycle.
let detectcycle = detectDirectedCycle(this.data.graph);

if (this.debug) {
for (let i = 0; i < this.data.links.length; i += 1) {
let link = this.data.links[i];
let source_callsite = link["source"];
let target_callsite = link["target"];
let weight = link["weight"];

console.debug("=============================================");
console.debug("[Ensemble SuperGraph] Source Name :", source_callsite);
console.debug("[Ensemble SuperGraph] Target Name :", target_callsite);
console.debug("[Ensemble SuperGraph] Weight: ", weight);
}
for (let i = 0; i < this.data.links.length; i += 1) {
let link = this.data.links[i];
let source_callsite = link["source"];
let target_callsite = link["target"];
let weight = link["weight"];

console.debug("=============================================");
console.debug("[Ensemble SuperGraph] Source Name :", source_callsite);
console.debug("[Ensemble SuperGraph] Target Name :", target_callsite);
console.debug("[Ensemble SuperGraph] Weight: ", weight);
}

this.render();
Expand Down Expand Up @@ -217,14 +215,8 @@ export default {
} else if (node.type == "component-node") {
nodeMap[node.name] = idx;
}
if (this.debug) {
console.log(
"[Preprocess] Assigning",
node.id,
" with map index: ",
idx
);
}

console.debug(`[Supergraph] Assigning ${node.id} with index ${idx}`);
idx += 1;
}
graph.nodeMap = nodeMap;
Expand Down Expand Up @@ -270,55 +262,32 @@ export default {
* Internal function to initiate the intermediate nodes and edges computation.
*/
_add_intermediate(nodes, edges) {
console.debug(
"===================Adding intermediate nodes=================="
);
const temp_nodes = nodes.slice();
const temp_edges = edges.slice();

this.existingIntermediateNodes = {};

let removeActualEdges = [];
let count = {};

for (let i = 0; i < temp_edges.length; i++) {
const source = temp_edges[i].source;
const target = temp_edges[i].target;

if (this.debug) {
console.log("==============================");
console.log("[Ensemble SuperGraph] Source Name", source);
console.log("[Ensemble SuperGraph] Target Name", target);
console.log("[Ensemble SuperGraph] This edge: ", temp_edges[i]);
}
console.debug("[SuperGraph] Source Name", source);
console.debug("[SuperGraph] Target Name", target);
console.debug("[SuperGraph] This edge: ", temp_edges[i]);

let source_node = temp_edges[i].source_data;
let target_node = temp_edges[i].target_data;

if (this.debug) {
console.log(
"[Ensemble SuperGraph] Source Node",
source_node,
target_node.level
);
console.log(
"[Ensemble SuperGraph] Target Node",
target_node,
target_node.level
);
}
console.debug(`[SuperGraph] Source Node: ${source_node}, Level: ${source_node.level}`);
console.debug(`[Ensemble SuperGraph] Target Node: ${target_node} Level: ${target_node.level}`);

const source_level = source_node.level;
const target_level = target_node.level;
const shift_level = target_level - source_level;

if (this.debug) {
console.log(source_level, target_level);
console.log(
"[Ensemble SuperGraph] Number of levels to shift: ",
shift_level
);
}
console.debug(source_level, target_level);
console.debug(`[SuperGraph] Number of levels to shift: ${shift_level}`);

let targetDataset = this.$store.selectedTargetDataset;
// Put in intermediate nodes.
Expand All @@ -345,7 +314,6 @@ export default {
tempNode[targetDataset] = target_node[targetDataset];

if (firstNode) {
console.log(tempNode);
nodes.push(tempNode);
firstNode = false;
}
Expand All @@ -354,13 +322,7 @@ export default {
} else {
if (count[temp_edges[i].source] == undefined) {
count[temp_edges[i].source] = 0;
console.log(
temp_edges[i].weight,
temp_edges[i].source,
temp_edges[i].target
);
this.existingIntermediateNodes[target_node.id].value +=
temp_edges[i].weight;
this.existingIntermediateNodes[target_node.id].value += temp_edges[i].weight;
} else {
count[temp_edges[i].source] += 1;
}
Expand All @@ -378,21 +340,16 @@ export default {
max_flow: max_flow,
};
edges.push(sourceTempEdge);
if (this.debug) {
console.log(
"[Ensemble SuperGraph] Adding intermediate source edge: ",
sourceTempEdge
);
}

console.debug(`[SuperGraph] Adding intermediate source edge: ${sourceTempEdge}`);

if (j == shift_level) {
edges[i].original_target = target;
}
edges[i].target_data = nodes[intermediate_idx];
if (this.debug) {
console.log("[Ensemble SuperGraph] Updating this edge:", edges[i]);
}


console.debug(`[SuperGraph] Updating this edge: ${edges[i]}`);

const targetTempEdge = {
type: "target_intermediate",
source: tempNode.id,
Expand All @@ -403,20 +360,15 @@ export default {
max_flow: max_flow,
};
edges.push(targetTempEdge);
if (this.debug) {
console.log(
"[Ensemble SuperGraph] Adding intermediate target edge: ",
targetTempEdge
);
}

console.log(`[SuperGraph] Adding intermediate target edge: ${targetTempEdge}`);

if (j == shift_level) {
edges[i].original_target = target;
}
edges[i].target_data = nodes[intermediate_idx];
if (this.debug) {
console.log("[Ensemble SuperGraph] Updating this edge:", edges[i]);
}

console.debug(`[SuperGraph] Updating this edge: ${edges[i]}`);

removeActualEdges.push({
source,
Expand All @@ -425,25 +377,15 @@ export default {
}
}

if (this.debug) {
console.log(
"[Ensemble SuperGraph] Removing",
removeActualEdges.length,
" edges."
);
}
console.debug(`[SuperGraph] Removing ${removeActualEdges.length} edges`);

for (let i = 0; i < removeActualEdges.length; i += 1) {
let removeEdge = removeActualEdges[i];
if (this.debug) {
console.log("[Ensemble SuperGraph] Removing edge: ", removeEdge);
}

console.debug(`[SuperGraph] Removing edge: ${removeEdge}`);
for (let edge_idx = 0; edge_idx < edges.length; edge_idx += 1) {
let curr_edge = edges[edge_idx];
if (
removeEdge.source == curr_edge.source &&
removeEdge.target == curr_edge.target
) {
if (removeEdge.source == curr_edge.source && removeEdge.target == curr_edge.target) {
edges.splice(edge_idx, 1);
}
}
Expand Down