diff --git a/app/src/components/callflowSingle.js b/app/src/components/callflowSingle.js index eeb4db32..4b7063e6 100644 --- a/app/src/components/callflowSingle.js +++ b/app/src/components/callflowSingle.js @@ -24,13 +24,6 @@ import SingleScatterplot from "./singleScatterplot/singleScatterplot"; import SingleHistogram from "./singleHistogram/singleHistogram"; import CallsiteInformation from "./callsiteInformation/callsiteInformation"; -// Ensemble mode imports -import CallsiteCorrespondence from "./callsiteCorrespondence/callsiteCorrespondence"; -import EnsembleHistogram from "./ensembleHistogram/ensembleHistogram"; -import ModuleHierarchy from "./moduleHierarchy/moduleHierarchy"; -import EnsembleScatterplot from "./ensembleScatterplot/ensembleScatterplot"; -import ParameterProjection from "./parameterProjection/parameterProjection"; - import io from "socket.io-client"; import * as utils from "./utils"; @@ -46,12 +39,6 @@ export default { SingleScatterplot, SingleHistogram, CallsiteInformation, - // Ensemble supergraph components. - EnsembleScatterplot, - EnsembleHistogram, - ModuleHierarchy, - ParameterProjection, - CallsiteCorrespondence, }, watch: { @@ -83,7 +70,7 @@ export default { filterPercRange: [0, 100], selectedFilterPerc: 5, metrics: ["Exclusive", "Inclusive"],//, 'Imbalance'], - selectedMetric: "Exclusive", + selectedMetric: "Inclusive", runtimeColorMap: [], distributionColorMap: [], selectedRuntimeColorMap: "OrRd", @@ -489,6 +476,7 @@ export default { }, init() { + console.assert(this.selectedMode, "Single"); // Initialize colors this.setupColors(); this.setOtherData(); @@ -502,23 +490,13 @@ export default { console.log("Format = ", this.selectedFormat); // Call the appropriate socket to query the server. - if (this.selectedMode == "Single") { - - if (this.selectedFormat == "SuperGraph") { - this.initComponents(this.currentSingleSuperGraphComponents); - } - else if (this.selectedFormat == "CCT") { - this.initComponents(this.currentSingleCCTComponents); - } + if (this.selectedFormat == "SuperGraph") { + this.initComponents(this.currentSingleSuperGraphComponents); } - else if (this.selectedMode == "Ensemble") { - if (this.selectedFormat == "SuperGraph") { - this.initComponents(this.currentEnsembleSuperGraphComponents); - } - else if (this.selectedFormat == "CCT") { - this.initComponents(this.currentEnsembleCCTComponents); - } + else if (this.selectedFormat == "CCT") { + this.initComponents(this.currentSingleCCTComponents); } + EventHandler.$emit("show-target-auxiliary", {}); }, reset() { @@ -548,8 +526,6 @@ export default { this.$store.selectedTargetDataset = this.selectedTargetDataset; console.debug("[Update] Target Dataset: ", this.selectedTargetDataset); this.init(); - EventHandler.$emit("show-target-auxiliary", { - }); }, updateMode() { diff --git a/app/src/components/callsiteInformation/box.js b/app/src/components/callsiteInformation/box.js index d894c2fd..23b1506a 100644 --- a/app/src/components/callsiteInformation/box.js +++ b/app/src/components/callsiteInformation/box.js @@ -27,9 +27,8 @@ export default { * @param {*} q * @param {*} targetq * @param {*} xScale - * @param {*} showTarget */ - init(callsite, q, targetq, xScale, showTarget) { + init(callsite, q, targetq, xScale) { if (this.debug) { console.log("Ensemble q: ", q); console.log("Target q: ", targetq); diff --git a/app/src/components/callsiteInformation/boxplot.js b/app/src/components/callsiteInformation/boxplot.js index fb0fd0b0..1a57301a 100644 --- a/app/src/components/callsiteInformation/boxplot.js +++ b/app/src/components/callsiteInformation/boxplot.js @@ -62,7 +62,8 @@ export default { mounted() { this.init(); let self = this; - EventHandler.$on("show_target_auxiliary", (data) => { + + EventHandler.$on("show-target-auxiliary", (data) => { self.clear(); self.init(); }); diff --git a/app/src/components/singleHistogram/singleHistogram.js b/app/src/components/singleHistogram/singleHistogram.js index 8e1b220e..b726aeaf 100644 --- a/app/src/components/singleHistogram/singleHistogram.js +++ b/app/src/components/singleHistogram/singleHistogram.js @@ -161,8 +161,8 @@ export default { mpiData.forEach((val, idx) => { let pos = Math.floor((val - dataMin) / dataWidth); - if (pos >= this.$store.selectedBinCount) { - pos = this.$store.selectedBinCount - 1; + if (pos >= this.$store.selectedMPIBinCount) { + pos = this.$store.selectedMPIBinCount - 1; } if (binContainsProcID[pos] == null) { binContainsProcID[pos] = []; @@ -237,7 +237,7 @@ export default { }, sanitizeGroupProc(string) { - return string.replace("[", "").replace("]", ""); + return string.replace(/\[/g, "").replace(/]/g, ""); }, bars() { @@ -265,7 +265,7 @@ export default { .style("fill", "orange") .style("fill-opacity", 1); let groupProcStr = self.groupProcess(self.binContainsProcID[i]).string; - groupProcStr = this.sanitizeGroupProc(groupProcStr); + groupProcStr = self.sanitizeGroupProc(groupProcStr); self.$refs.ToolTip.render(groupProcStr, d); }) .on("mouseover", function (d, i) { @@ -275,7 +275,7 @@ export default { .style("fill", "orange") .style("fill-opacity", 1); let groupProcStr = self.groupProcess(self.binContainsProcID[i]).string; - groupProcStr = this.sanitizeGroupProc(groupProcStr); + groupProcStr = self.sanitizeGroupProc(groupProcStr); self.$refs.ToolTip.render(groupProcStr, d); }) .on("mouseout", function (d, i) { @@ -383,7 +383,7 @@ export default { }, rankLineScale() { - let rankCount = this.numOfRanks; + let rankCount = this.$store.modules[this.$store.selectedTargetDataset][this.$store.selectedModule][this.$store.selectedMetric].data.length; this.ranklinescale = d3.scaleLinear() .domain([0, rankCount]) diff --git a/app/src/components/singleScatterplot/singleScatterplot.js b/app/src/components/singleScatterplot/singleScatterplot.js index ca362af9..e51e84e8 100644 --- a/app/src/components/singleScatterplot/singleScatterplot.js +++ b/app/src/components/singleScatterplot/singleScatterplot.js @@ -43,6 +43,7 @@ export default { paddingFactor: 3.5, x_max_exponent: 0, y_max_exponent: 0, + corr_coef: 0 }), @@ -101,10 +102,12 @@ export default { .range([this.yAxisHeight, this.padding.top]); this.regression = this.leastSquares(this.xArray, this.yArray); + this.corr_coef = Math.round(this.regression["corr_coef"] * 100) / 100; + this.xAxis(); this.yAxis(); this.dots(); - this.correlationText(); + // this.correlationText(); // this.trendline() }, @@ -202,11 +205,10 @@ export default { var step3 = (n * sum_y2) - (sum_y * sum_y); var step4 = Math.sqrt(step2 * step3); - var corre_coef = step1 / step4; - + let corr_coef = step1 / step4; return { "y_res": yhat, - "corr_coef": corre_coef + "corr_coef": corr_coef }; }, diff --git a/app/src/components/supergraph/nodes.js b/app/src/components/supergraph/nodes.js index de57387f..247318e6 100644 --- a/app/src/components/supergraph/nodes.js +++ b/app/src/components/supergraph/nodes.js @@ -265,6 +265,8 @@ export default { EventHandler.$emit("select-module", { module: this.$store.selectedModule, }); + + EventHandler.$emit("show-target-auxiliary", {}); }, mouseover(node) { diff --git a/app/src/css/app.css b/app/src/css/app.css index a1d157e9..3e2f877e 100644 --- a/app/src/css/app.css +++ b/app/src/css/app.css @@ -96,4 +96,11 @@ body { #footer { color: #fff; +} + + +/* Over write the primary text to avoid blue color change on selection*/ +.my-app.v-application .primary--text { + color: #fff !important; + caret-color: #fff !important; } \ No newline at end of file diff --git a/app/src/html/callflowSingle.html b/app/src/html/callflowSingle.html index 9a0be90b..f2b553af 100644 --- a/app/src/html/callflowSingle.html +++ b/app/src/html/callflowSingle.html @@ -41,11 +41,6 @@ refresh - - - General - - Visual Encoding diff --git a/app/src/html/callsiteInformation.html b/app/src/html/callsiteInformation.html index e236ac2d..fc1fbc14 100644 --- a/app/src/html/callsiteInformation.html +++ b/app/src/html/callsiteInformation.html @@ -11,10 +11,6 @@ - -

-
- Reveal @@ -37,8 +33,8 @@ - -

{{numberOfcallsites}} call sites.

+ + {{numberOfcallsites}} call sites. diff --git a/app/src/html/runtimeScatterplot.html b/app/src/html/runtimeScatterplot.html index 3486ebf2..9b202988 100644 --- a/app/src/html/runtimeScatterplot.html +++ b/app/src/html/runtimeScatterplot.html @@ -10,6 +10,9 @@ {{ message }} + + Corr. coef. = {{corr_coef}}. + \ No newline at end of file diff --git a/callflow/datastructures/supergraph.py b/callflow/datastructures/supergraph.py index b639c941..068a4133 100644 --- a/callflow/datastructures/supergraph.py +++ b/callflow/datastructures/supergraph.py @@ -78,8 +78,9 @@ def get_module_name(self, callsite): Return: module name (str) - Returns the module name """ - if callsite in self.props["callsite_module_map"]: - return self.props["callsite_module_map"][callsite] + if "callsite_module_map" in self.props: + if callsite in self.props["callsite_module_map"]: + return self.props["callsite_module_map"][callsite] return self.gf.lookup_with_name(callsite)["module"].unique()[0]