From 247fad5bfe31c0f9a07d0b8dd5d191c58b985925 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Tue, 27 Sep 2016 17:24:34 -0700 Subject: [PATCH] clean up jitter stats --- scripts/developer/utilities/audio/Jitter.qml | 26 ++----- .../developer/utilities/audio/MovingValue.qml | 3 +- .../utilities/audio/MovingValuePair.qml | 78 ------------------- scripts/developer/utilities/audio/Stream.qml | 10 +-- scripts/developer/utilities/audio/stats.qml | 10 +-- 5 files changed, 17 insertions(+), 110 deletions(-) delete mode 100644 scripts/developer/utilities/audio/MovingValuePair.qml diff --git a/scripts/developer/utilities/audio/Jitter.qml b/scripts/developer/utilities/audio/Jitter.qml index 04b126584b..91f197a919 100644 --- a/scripts/developer/utilities/audio/Jitter.qml +++ b/scripts/developer/utilities/audio/Jitter.qml @@ -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 } } diff --git a/scripts/developer/utilities/audio/MovingValue.qml b/scripts/developer/utilities/audio/MovingValue.qml index 26fed9319d..bbd9c31d6b 100644 --- a/scripts/developer/utilities/audio/MovingValue.qml +++ b/scripts/developer/utilities/audio/MovingValue.qml @@ -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 diff --git a/scripts/developer/utilities/audio/MovingValuePair.qml b/scripts/developer/utilities/audio/MovingValuePair.qml deleted file mode 100644 index b24ab658d2..0000000000 --- a/scripts/developer/utilities/audio/MovingValuePair.qml +++ /dev/null @@ -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 }] - } -} diff --git a/scripts/developer/utilities/audio/Stream.qml b/scripts/developer/utilities/audio/Stream.qml index 936fce220e..e9383b627a 100644 --- a/scripts/developer/utilities/audio/Stream.qml +++ b/scripts/developer/utilities/audio/Stream.qml @@ -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 } diff --git a/scripts/developer/utilities/audio/stats.qml b/scripts/developer/utilities/audio/stats.qml index 212025c73a..346e5e3544 100644 --- a/scripts/developer/utilities/audio/stats.qml +++ b/scripts/developer/utilities/audio/stats.qml @@ -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 } }