clean up jitter stats

This commit is contained in:
Zach Pomerantz 2016-09-27 17:24:34 -07:00
parent aacfa7d6c5
commit 247fad5bfe
5 changed files with 17 additions and 110 deletions

View file

@ -16,29 +16,17 @@ ColumnLayout {
id: jitter
property var max
property var avg
property var maxWindow
property var avgWindow
property bool showGraphs: false
MovingValuePair {
label: "Window"
label1: "Maximum"
label2: "Average"
source1: maxWindow
source2: avgWindow
color1: "red"
color2: "darkslategrey"
MovingValue {
label: "Jitter"
color: "red"
source: max - avg
showGraphs: jitter.showGraphs
}
MovingValuePair {
label: "Overall"
label1: "Maximum"
label2: "Average"
source1: max
source2: avg
color1: "firebrick"
color2: "darkslategrey"
showGraphs: jitter.showGraphs
Value {
label: "Average"
source: avg
}
}

View file

@ -20,6 +20,7 @@ RowLayout {
property string unit: "ms"
property bool showGraphs: false
property color color: "darkslategrey"
property int decimals: 0
width: parent.width
@ -33,7 +34,7 @@ RowLayout {
Layout.preferredWidth: 50
horizontalAlignment: Text.AlignRight
color: value.color
text: value.source + ' ' + unit
text: value.source.toFixed(decimals) + ' ' + unit
}
PlotPerf {
visible: value.showGraphs

View file

@ -1,78 +0,0 @@
//
// MovingValuePair.qml
// scripts/developer/utilities/audio
//
// Created by Zach Pomerantz on 9/22/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
import QtQuick.Layouts 1.3
import "../lib/plotperf"
RowLayout {
id: value
property string label
property string label1
property string label2
property var source1
property var source2
property color color1
property color color2
property string unit: "ms"
property bool showGraphs: false
property int labelPixelWidth: 50
property int dataPixelWidth: 100
Label {
Layout.preferredWidth: 50 - value.spacing
text: value.label
}
ColumnLayout {
RowLayout {
Label {
Layout.preferredWidth: 50
color: value.color1
text: value.label1
}
Label {
visible: !value.showGraphs
Layout.preferredWidth: 50
horizontalAlignment: Text.AlignRight
color: value.color1
text: value.source1 + ' ' + unit
}
}
RowLayout {
Label {
Layout.preferredWidth: 50
color: value.color2
text: value.label2
}
Label {
visible: !value.showGraphs
Layout.preferredWidth: 50
horizontalAlignment: Text.AlignRight
color: value.color2
text: value.source2 + ' ' + unit
}
}
}
PlotPerf {
visible: value.showGraphs
Layout.fillWidth: true
height: 70
valueUnit: value.unit
valueNumDigits: 0
backgroundOpacity: 0.2
plots: [{ binding: "source1", color: value.color1 }, { binding: "source2", color: value.color2 }]
}
}

View file

@ -23,14 +23,14 @@ ColumnLayout {
font.italic: true
}
MovingValue {
label: "Desired"
label: "Minimum Depth"
color: "limegreen"
source: stream.framesDesired
unit: "frames"
showGraphs: root.showGraphs
}
MovingValue {
label: "Unplayed"
label: "Buffer Depth"
color: "darkblue"
source: stream.unplayedMsMax
showGraphs: root.showGraphs
@ -46,10 +46,8 @@ ColumnLayout {
font.italic: true
}
Jitter {
max: stream.timegapMsMax
avg: stream.timegapMsAvg
maxWindow: stream.timegapMsMaxWindow
avgWindow: stream.timegapMsAvgWindow
max: stream.timegapMsMaxWindow
avg: stream.timegapMsAvgWindow
showGraphs: root.showGraphs
}

View file

@ -47,9 +47,9 @@ Column {
control: ColumnLayout {
MovingValue { label: "Input Read"; source: AudioStats.inputReadMsMax; showGraphs: stats.showGraphs }
MovingValue { label: "Input Ring"; source: AudioStats.inputUnplayedMsMax; showGraphs: stats.showGraphs }
MovingValue { label: "Network (up)"; source: AudioStats.pingMs / 2; showGraphs: stats.showGraphs }
MovingValue { label: "Network (up)"; source: AudioStats.pingMs / 2; showGraphs: stats.showGraphs; decimals: 1 }
MovingValue { label: "Mixer Ring"; source: AudioStats.mixerStream.unplayedMsMax; showGraphs: stats.showGraphs }
MovingValue { label: "Network (down)"; source: AudioStats.pingMs / 2; showGraphs: stats.showGraphs }
MovingValue { label: "Network (down)"; source: AudioStats.pingMs / 2; showGraphs: stats.showGraphs; decimals: 1 }
MovingValue { label: "Output Ring"; source: AudioStats.clientStream.unplayedMsMax; showGraphs: stats.showGraphs }
MovingValue { label: "Output Read"; source: AudioStats.outputUnplayedMsMax; showGraphs: stats.showGraphs }
MovingValue { label: "TOTAL"; color: "black"; showGraphs: stats.showGraphs
@ -67,10 +67,8 @@ Column {
label: "Upstream Jitter"
description: "Timegaps in packets sent to the mixer"
control: Jitter {
max: AudioStats.sentTimegapMsMax
avg: AudioStats.sentTimegapMsAvg
maxWindow: AudioStats.sentTimegapMsMaxWindow
avgWindow: AudioStats.sentTimegapMsAvgWindow
max: AudioStats.sentTimegapMsMaxWindow
avg: AudioStats.sentTimegapMsAvgWindow
showGraphs: stats.showGraphs
}
}