Skip to content

Commit

Permalink
#148: fixing code style
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfsilva committed Mar 29, 2020
1 parent 2d2ff0c commit 7ffeefb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion tools/wrench/dashboard/public/js/d3-3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function gridPlane(grid, options, point$$1, angles){
var pl = [points[p1], points[p2], points[p3], points[p4]];

if (p3 < 0) {
continue
continue;
}

pl.plane = 'plane_' + cnt++;
Expand Down
4 changes: 2 additions & 2 deletions tools/wrench/dashboard/public/js/jQueryRotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// Library agnostic interface

Wilq32=window.Wilq32||{};
var Wilq32=window.Wilq32||{};
Wilq32.PhotoEffect=(function(){

if (supportedCSS) {
Expand Down Expand Up @@ -317,7 +317,7 @@
}

})()
}
};

if (IE)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function changeOriginOrScale(newOrigin, newScale) {
grid3d(xGrid),
scale3d([yLine]),
cubes3d(cubesData),
scale3d([xLine]),
scale3d([xLine]),
data.contents,
cubes3d(ftCubesData)
]
Expand Down Expand Up @@ -131,8 +131,8 @@ function makeCube(h, x, z, duration, colour, taskId){
function dragged(){
mouseX = mouseX || 0;
mouseY = mouseY || 0;
beta = (d3.event.x - mx + mouseX) * Math.PI / 230 ;
alpha = (d3.event.y - my + mouseY) * Math.PI / 230 * (-1);
var beta = (d3.event.x - mx + mouseX) * Math.PI / 230 ;
var alpha = (d3.event.y - my + mouseY) * Math.PI / 230 * (-1);
yAngle = beta + startAngle
xAngle = alpha - startAngle
var rotatedData = [
Expand Down Expand Up @@ -409,7 +409,7 @@ function processData(data, tt, populateLegend){
.classed('_3d', true)
.merge(faces)
.transition().duration(tt)
.attr('d', cubes3d.draw)
.attr('d', cubes3d.draw)

faces.exit().remove();

Expand All @@ -429,7 +429,7 @@ function processData(data, tt, populateLegend){
})
.attr('stroke', function(d){ return d3.color(color(d.id)); })
.merge(cubes)

/* --------- FT FACES ---------*/

var ftFaces = ftCubes.merge(ftCE).selectAll('path.face').data(function(d){ return d.faces; }, function(d){ return d.face; });
Expand All @@ -441,7 +441,7 @@ function processData(data, tt, populateLegend){
.classed('_3d', true)
.merge(ftFaces)
.transition().duration(tt)
.attr('d', cubes3d.draw)
.attr('d', cubes3d.draw)

}

Expand Down Expand Up @@ -506,7 +506,7 @@ function generate3dGraph(data, populateLegend, needToInitialise, svgId, originXI
showInstructions("three-d-instructions", "three-d-information-img")
}

xGrid = [], scatter = [], yLine = [], xLine = []
var xGrid = [], scatter = [], yLine = [], xLine = []
for(var z = 0; z <= maxTime + timeScalingFactor; z+=timeScalingFactor){
for(var x = 0; x < maxTaskOverlap; x++) {
xGrid.push([x, 1, z/timeScalingFactor])
Expand All @@ -519,8 +519,8 @@ function generate3dGraph(data, populateLegend, needToInitialise, svgId, originXI
d3.range(0, maxTime, timeScalingFactor).forEach(function(d) { xLine.push([0, 1, d / timeScalingFactor, d]) })
xLine.push([0,1,(maxTime / timeScalingFactor) + 1, "Time (seconds)"]) // for axis label

cubesData = []
ftCubesData = []
var cubesData = []
var ftCubesData = []
data.forEach(function(d) {
var h = d.num_cores_allocated
var z = d.whole_task.start / timeScalingFactor
Expand Down
12 changes: 6 additions & 6 deletions tools/wrench/dashboard/scripts/graph-sections/energy-graphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
legendId: id of the <div> that will contain the graph
*/
function generateConsumedEnergyGraph(energyData, graphId, legendId) {
eData = [];
xAxisMarks = ["x"];
var eData = [];
var xAxisMarks = ["x"];
// Iterate through data for each host
for(var i = 0; i < energyData.length; i++) {
var hostData = energyData[i]["consumed_energy_trace"];

consumedEnergyData = []
var consumedEnergyData = []

// Iterate through each energy trace for a host
for(var j = 0; j < hostData.length; j++) {
Expand Down Expand Up @@ -70,13 +70,13 @@ function generateConsumedEnergyGraph(energyData, graphId, legendId) {
legendId: id of the HTML element that will contain the graph
*/
function generatePStateGraph(energyData, graphId, legendId) {
pStateData = [];
xAxisMarks = ["x"];
var pStateData = [];
var xAxisMarks = ["x"];
// Iterate through data for each host
for(var i = 0; i < energyData.length; i++) {
var hostData = energyData[i]["pstate_trace"];

consumedEnergyData = []
var consumedEnergyData = []

// Iterate through each energy trace for a host
for(var j = 0; j < hostData.length; j++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function getComputeTime(d) {
function generateHostUtilizationGraph(data, containerId, tooltipId, tooltipTaskId, tooltipComputeTime, CONTAINER_WIDTH, CONTAINER_HEIGHT) {
var num_cores = determineNumCores(data);
var container = d3.select(`#${containerId}`);
document.getElementById(containerId).innerHTML = hostUtilizationHtml
document.getElementById(containerId).innerHTML = hostUtilizationHtml;
var chart = document.getElementById(containerId);
const PADDING = 60;

Expand All @@ -45,7 +45,7 @@ function generateHostUtilizationGraph(data, containerId, tooltipId, tooltipTaskI

var tooltip = d3.select(`#${tooltipId}`);
var tooltip_task_id = d3.select(`#${tooltipTaskId}`);
var tooltip_compute_time = d3.select(`#${tooltipComputeTime}`)
var tooltip_compute_time = d3.select(`#${tooltipComputeTime}`);

svg = container.append("svg")
.attr("width", CONTAINER_WIDTH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function getOverallWorkflowMetrics(data, tableContainer, taskClass) {

var writeDuration = getDuration(write.start, write.end)
if (writeDuration !== write.start && writeDuration !== write.end) {
totalWriteDuration == writeDuration
totalWriteDuration += writeDuration
}

averageReadDuration = totalReadDuration / noTasks
Expand Down

0 comments on commit 7ffeefb

Please sign in to comment.