168 lines
5.0 KiB
QML
Raw Permalink Normal View History

//
// stats.qml
// examples/utilities/render
//
// Created by Zach Pomerantz on 2/8/2016
// Copyright 2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.5
import QtQuick.Controls 1.4
2016-04-01 18:22:51 -07:00
import "../lib/plotperf"
2016-03-23 17:52:06 -07:00
Item {
2016-03-25 03:02:18 -07:00
id: statsUI
anchors.fill:parent
Column {
id: stats
2016-03-25 03:02:18 -07:00
spacing: 8
anchors.fill:parent
property var config: Render.getConfig("Stats")
function evalEvenHeight() {
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
return (height - spacing * (children.length - 1)) / children.length
}
2016-03-25 03:02:18 -07:00
PlotPerf {
title: "Triangles"
height: parent.evalEvenHeight()
object: stats.config
valueScale: 1000
valueUnit: "K"
plots: [
{
prop: "frameTriangleCount",
label: "Triangles",
color: "#1AC567"
},
{
prop: "frameTriangleRate",
label: "rate",
color: "#E2334D",
scale: 0.001,
unit: "MT/s"
}
]
}
PlotPerf {
title: "Drawcalls"
height: parent.evalEvenHeight()
object: stats.config
plots: [
{
prop: "frameAPIDrawcallCount",
label: "API Drawcalls",
color: "#00B4EF"
},
{
prop: "frameDrawcallCount",
label: "GPU Drawcalls",
color: "#1AC567"
},
{
prop: "frameDrawcallRate",
label: "rate",
color: "#E2334D",
scale: 0.001,
unit: "K/s"
}
]
}
2016-04-18 11:18:28 -07:00
PlotPerf {
title: "State Changes"
height: parent.evalEvenHeight()
object: stats.config
plots: [
{
prop: "frameTextureCount",
label: "Textures",
color: "#00B4EF"
},
{
prop: "frameSetPipelineCount",
label: "Pipelines",
color: "#E2334D"
},
{
prop: "frameSetInputFormatCount",
label: "Input Formats",
color: "#1AC567"
2016-04-18 11:18:28 -07:00
}
]
}
2016-04-18 11:18:28 -07:00
property var drawOpaqueConfig: Render.getConfig("RenderMainView.DrawOpaqueDeferred")
property var drawTransparentConfig: Render.getConfig("RenderMainView.DrawTransparentDeferred")
property var drawLightConfig: Render.getConfig("RenderMainView.DrawLight")
PlotPerf {
title: "Items"
height: parent.evalEvenHeight()
object: parent.drawOpaqueConfig
2016-04-11 18:34:14 -07:00
plots: [
{
2016-03-30 16:09:33 -07:00
object: parent.drawOpaqueConfig,
prop: "numDrawn",
label: "Opaques",
color: "#1AC567"
},
{
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
prop: "numDrawn",
label: "Translucents",
color: "#00B4EF"
},
{
object: Render.getConfig("RenderMainView.DrawLight"),
prop: "numDrawn",
label: "Lights",
2016-03-30 16:09:33 -07:00
color: "#FED959"
}
]
}
PlotPerf {
title: "Timing"
height: parent.evalEvenHeight()
object: parent.drawOpaqueConfig
valueUnit: "ms"
valueScale: 1
valueNumDigits: "2"
plots: [
{
object: Render.getConfig("RenderMainView.DrawOpaqueDeferred"),
prop: "cpuRunTime",
label: "Opaques",
color: "#1AC567"
},
{
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
prop: "cpuRunTime",
label: "Translucents",
color: "#00B4EF"
},
{
object: Render.getConfig("RenderMainView.RenderDeferred"),
prop: "cpuRunTime",
label: "Lighting",
color: "#FED959"
},
{
object: Render.getConfig("RenderMainView.RenderDeferredTask"),
prop: "cpuRunTime",
label: "RenderFrame",
color: "#E2334D"
}
]
}
}
2016-04-26 11:24:38 -07:00
}