content/hifi-public/scripts/example/misc/statsExample.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

67 lines
1.4 KiB
JavaScript

//
// statsExample.js
// examples/example/misc
//
// Created by Thijs Wenker on 24 Sept 2015
// Copyright 2015 High Fidelity, Inc.
//
// Prints the stats to the console.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// The stats to be displayed
var stats = [
'serverCount',
'framerate', // a.k.a. FPS
'simrate',
'avatarSimrate',
'avatarCount',
'packetInCount',
'packetOutCount',
'mbpsIn',
'mbpsOut',
'audioPing',
'avatarPing',
'entitiesPing',
'assetPing',
'velocity',
'yaw',
'avatarMixerKbps',
'avatarMixerPps',
'audioMixerKbps',
'audioMixerPps',
'downloads',
'downloadsPending',
'triangles',
'quads',
'materialSwitches',
'meshOpaque',
'meshTranslucent',
'opaqueConsidered',
'opaqueOutOfView',
'opaqueTooSmall',
'translucentConsidered',
'translucentOutOfView',
'translucentTooSmall',
'sendingMode',
'packetStats',
'lodStatus',
'timingStats',
'serverElements',
'serverInternal',
'serverLeaves',
'localElements',
'localInternal',
'localLeaves'
];
// Force update the stats, in case the stats panel is invisible
Stats.forceUpdateStats();
// Loop through the stats and display them
for (var i in stats) {
var stat = stats[i];
print(stat + " = " + Stats[stat]);
}