Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Fix graph axes naming for ram statistics #1033

Merged
merged 2 commits into from
Aug 24, 2020
Merged
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
37 changes: 12 additions & 25 deletions meshroom/ui/qml/GraphEditor/StatViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Item {
root.nbReads = categories[0].length-1

for(var j = 0; j < nbCores; j++) {
var lineSerie = cpuChart.createSeries(ChartView.SeriesTypeLine, "CPU" + j, valueAxisX, valueAxisY)
var lineSerie = cpuChart.createSeries(ChartView.SeriesTypeLine, "CPU" + j, valueCpuX, valueCpuY)

if(categories[j].length === 1) {
lineSerie.append(0, categories[j][0])
Expand All @@ -177,7 +177,7 @@ Item {
lineSerie.color = colors[j % colors.length]
}

var averageLine = cpuChart.createSeries(ChartView.SeriesTypeLine, "AVERAGE", valueAxisX, valueAxisY)
var averageLine = cpuChart.createSeries(ChartView.SeriesTypeLine, "AVERAGE", valueCpuX, valueCpuY)
var average = []

for(var l = 0; l < categories[0].length; l++) {
Expand Down Expand Up @@ -227,7 +227,7 @@ Item {
root.ramLabel = "RAM Max Peak: "
}

var ramSerie = ramChart.createSeries(ChartView.SeriesTypeLine, root.ramLabel + root.ramTotal + "GB", valueAxisX2, valueAxisRam)
var ramSerie = ramChart.createSeries(ChartView.SeriesTypeLine, root.ramLabel + root.ramTotal + "GB", valueRamX, valueRamY)

if(ram.length === 1) {
// Create 2 entries if we have only one input value to create a segment that can be display
Expand All @@ -253,9 +253,9 @@ Item {
var gpuUsed = getPropertyWithDefault(jsonObject.computer.curves, 'gpuUsed', 0)
var gpuTemperature = getPropertyWithDefault(jsonObject.computer.curves, 'gpuTemperature', 0)

var gpuUsedSerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "GPU", valueAxisX3, valueAxisY3)
var gpuUsedMemorySerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "Memory", valueAxisX3, valueAxisY3)
var gpuTemperatureSerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "Temperature", valueAxisX3, valueAxisY3)
var gpuUsedSerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "GPU", valueGpuX, valueGpuY)
var gpuUsedMemorySerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "Memory", valueGpuX, valueGpuY)
var gpuTemperatureSerie = gpuChart.createSeries(ChartView.SeriesTypeLine, "Temperature", valueGpuX, valueGpuY)

if(gpuUsedMemory.length === 1) {
gpuUsedSerie.append(0, gpuUsed[0])
Expand Down Expand Up @@ -384,7 +384,7 @@ Item {
title: "CPU: " + root.nbCores + " cores, " + root.cpuFrequency + "Hz"

ValueAxis {
id: valueAxisY
id: valueCpuY
min: 0
max: 100
titleText: "<span style='color: " + textColor + "'>%</span>"
Expand All @@ -397,7 +397,7 @@ Item {
}

ValueAxis {
id: valueAxisX
id: valueCpuX
min: 0
max: root.deltaTime * Math.max(1, root.nbReads)
titleText: "<span style='color: " + textColor + "'>Minutes</span>"
Expand Down Expand Up @@ -439,7 +439,7 @@ Item {
title: root.ramLabel + root.ramTotal + "GB"

ValueAxis {
id: valueAxisY2
id: valueRamY
min: 0
max: 100
titleText: "<span style='color: " + textColor + "'>%</span>"
Expand All @@ -452,20 +452,7 @@ Item {
}

ValueAxis {
id: valueAxisRam
min: 0
max: root.ramTotal
titleText: "<span style='color: " + textColor + "'>GB</span>"
color: textColor
gridLineColor: textColor
minorGridLineColor: textColor
shadesColor: textColor
shadesBorderColor: textColor
labelsColor: textColor
}

ValueAxis {
id: valueAxisX2
id: valueRamX
min: 0
max: root.deltaTime * Math.max(1, root.nbReads)
titleText: "<span style='color: " + textColor + "'>Minutes</span>"
Expand Down Expand Up @@ -507,7 +494,7 @@ Item {
title: (root.gpuName || root.gpuTotalMemory) ? ("GPU: " + root.gpuName + ", " + root.gpuTotalMemory + "MB") : "No GPU"

ValueAxis {
id: valueAxisY3
id: valueGpuY
min: 0
max: root.gpuMaxAxis
titleText: "<span style='color: " + textColor + "'>%, °C</span>"
Expand All @@ -520,7 +507,7 @@ Item {
}

ValueAxis {
id: valueAxisX3
id: valueGpuX
min: 0
max: root.deltaTime * Math.max(1, root.nbReads)
titleText: "<span style='color: " + textColor + "'>Minutes</span>"
Expand Down