Skip to content
Open
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
8 changes: 4 additions & 4 deletions core/AlgorithmAnalyzer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ArrayGen from "../utils/ArrayGen.js";
import genGraphic from "../utils/genGraphic.js";
import genGraphic from "../utils/GenGraphic.js";
import ProgressManager from "../utils/ProgressManager.js";
import genLoadBalance from "../utils/genLoadBalance.js";

Expand Down Expand Up @@ -69,9 +69,9 @@ export default class AlgorithmAnalyzer {
});

// Generate Results and Save Images
genGraphic(randomData, xAxisLabels, "random-scenario-comparison");
genGraphic(increasingData, xAxisLabels, "increasing-scenario-comparison");
genGraphic(decreasingData, xAxisLabels, "decreasing-scenario-comparison");
genGraphic(randomData, xAxisLabels, ["random-scenario-comparison", "Cenario de numeros aleatorios"]);
genGraphic(increasingData, xAxisLabels, ["increasing-scenario-comparison", "Cenario de numeros crescentes"]);
genGraphic(decreasingData, xAxisLabels, ["decreasing-scenario-comparison", "Cenario de numeros decrescentes"]);

this.progressManager.updateProgress();
}
Expand Down
7 changes: 1 addition & 6 deletions simulation-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
"vector": [
100,
1000,
5000,
30000,
50000,
100000,
150000,
200000
5000
],
"balanceType": "preSelected",
"algorithms": [
Expand Down
6 changes: 3 additions & 3 deletions utils/GenGraphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default (data, labels, graphName) => {
y: {
suggestedMin: 0,
suggestedMax: 100,
max: 150,
max: 1000,
ticks: {
callback: function (value) {
return value + " ms";
Expand All @@ -39,7 +39,7 @@ export default (data, labels, graphName) => {
},
title: {
display: true,
text: "Sorting Algorithms Comparison",
text: graphName[1],
},
},
},
Expand All @@ -50,7 +50,7 @@ export default (data, labels, graphName) => {
mkdirSync(resultDir);
}

const outputPath = `${resultDir}/${graphName}.png`;
const outputPath = `${resultDir}/${graphName[0]}.png`;
const out = createWriteStream(outputPath);
const stream = canvas.createPNGStream();
stream.pipe(out);
Expand Down