Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 7 additions & 31 deletions app/src/components/callflowSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -46,12 +39,6 @@ export default {
SingleScatterplot,
SingleHistogram,
CallsiteInformation,
// Ensemble supergraph components.
EnsembleScatterplot,
EnsembleHistogram,
ModuleHierarchy,
ParameterProjection,
CallsiteCorrespondence,
},

watch: {
Expand Down Expand Up @@ -83,7 +70,7 @@ export default {
filterPercRange: [0, 100],
selectedFilterPerc: 5,
metrics: ["Exclusive", "Inclusive"],//, 'Imbalance'],
selectedMetric: "Exclusive",
selectedMetric: "Inclusive",
runtimeColorMap: [],
distributionColorMap: [],
selectedRuntimeColorMap: "OrRd",
Expand Down Expand Up @@ -489,6 +476,7 @@ export default {
},

init() {
console.assert(this.selectedMode, "Single");
// Initialize colors
this.setupColors();
this.setOtherData();
Expand All @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions app/src/components/callsiteInformation/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion app/src/components/callsiteInformation/boxplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
12 changes: 6 additions & 6 deletions app/src/components/singleHistogram/singleHistogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [];
Expand Down Expand Up @@ -237,7 +237,7 @@ export default {
},

sanitizeGroupProc(string) {
return string.replace("[", "").replace("]", "");
return string.replace(/\[/g, "").replace(/]/g, "");
},

bars() {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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])
Expand Down
10 changes: 6 additions & 4 deletions app/src/components/singleScatterplot/singleScatterplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
paddingFactor: 3.5,
x_max_exponent: 0,
y_max_exponent: 0,
corr_coef: 0
}),


Expand Down Expand Up @@ -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()
},

Expand Down Expand Up @@ -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
};
},

Expand Down
2 changes: 2 additions & 0 deletions app/src/components/supergraph/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ export default {
EventHandler.$emit("select-module", {
module: this.$store.selectedModule,
});

EventHandler.$emit("show-target-auxiliary", {});
},

mouseover(node) {
Expand Down
7 changes: 7 additions & 0 deletions app/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 0 additions & 5 deletions app/src/html/callflowSingle.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<v-icon v-on:click="reset()">refresh</v-icon>
</v-btn>

<!-- --------------------------- General Information ----------------------------------->
<v-flex xs12 class="ma-1">
<v-subheader class="teal lighten-4">General</v-subheader>
</v-flex>

<!-- --------------------------- Visual Encoding ----------------------------------->
<v-flex xs12 class="ma-1">
<v-subheader class="teal lighten-4">Visual Encoding</v-subheader>
Expand Down
8 changes: 2 additions & 6 deletions app/src/html/callsiteInformation.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

</v-chip>
<v-spacer></v-spacer>
<span class="component-info">
<p> </p>
</span>

<v-layout row wrap v-if="isCallsiteSelected == true">
<v-btn class="ma-1 reveal-button" small tile outlined color="white" @click="clickCallsite">
Reveal
Expand All @@ -37,8 +33,8 @@
</v-btn>
</v-layout>

<span class="component-data">
<p class="subtitle-2"> {{numberOfcallsites}} call sites.</p>
<span class="component-info">
{{numberOfcallsites}} call sites.
</span>
<v-container class="callsite-information-node" v-for="callsite in callsites" :id="getID(callsite.id)">
<v-layout row wrap>
Expand Down
3 changes: 3 additions & 0 deletions app/src/html/runtimeScatterplot.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<v-layout class="chip-container">
<v-chip class="chip" chips color="teal" label outlined clearable> {{ message }} </v-chip>
</v-layout>
<span class="component-info">
Corr. coef. = {{corr_coef}}.
</span>
<svg :id="svgID"></svg>
<ToolTip ref="ToolTip" />
</v-layout>
5 changes: 3 additions & 2 deletions callflow/datastructures/supergraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down