mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 05:51:28 +01:00
Added average tps to "During low tps spikes"
This commit is contained in:
parent
599bf4a837
commit
74a36a7a7a
@ -149,11 +149,13 @@ public class PerformanceJSONCreator implements ServerTabJSONCreator<Map<String,
|
||||
|
||||
Map<String, Object> insights = new HashMap<>();
|
||||
|
||||
double averageTPS = lowTPS.averageTPS();
|
||||
double avgPlayersOnline = lowTPS.averagePlayersOnline();
|
||||
double averageCPU = lowTPS.averageCPU();
|
||||
double averageEntities = lowTPS.averageEntities();
|
||||
double averageChunks = lowTPS.averageChunks();
|
||||
insights.put("low_tps_players", avgPlayersOnline != -1 ? decimals.apply(avgPlayersOnline) : locale.get(HtmlLang.TEXT_NO_LOW_TPS).toString());
|
||||
insights.put("low_tps_tps", averageTPS != -1 ? decimals.apply(averageTPS) : "-");
|
||||
insights.put("low_tps_cpu", averageCPU != -1 ? decimals.apply(averageCPU) : "-");
|
||||
insights.put("low_tps_entities", averageEntities != -1 ? decimals.apply(averageEntities) : "-");
|
||||
insights.put("low_tps_chunks", averageChunks != -1 ? decimals.apply(averageChunks) : "-");
|
||||
|
@ -348,6 +348,7 @@ function loadPerformanceValues(json, error) {
|
||||
element.querySelector('#data_low_tps_entities').innerText = data.low_tps_entities;
|
||||
element.querySelector('#data_low_tps_chunks').innerText = data.low_tps_chunks;
|
||||
element.querySelector('#data_low_tps_cpu').innerText = data.low_tps_cpu;
|
||||
element.querySelector('#data_low_tps_tps').innerText = data.low_tps_tps;
|
||||
}
|
||||
|
||||
async function loadOptimizedPerformanceGraph(json, error) {
|
||||
|
@ -1172,6 +1172,8 @@
|
||||
class="float-right"><b id="data_low_tps_chunks"></b></span></p>
|
||||
<p><i class="fa fa-fw fa-tachometer-alt col-red"></i> Average CPU<span
|
||||
class="float-right"><b id="data_low_tps_cpu"></b></span></p>
|
||||
<p><i class="fa fa-fw fa-tachometer-alt col-red"></i> Average TPS<span
|
||||
class="float-right"><b id="data_low_tps_tps"></b></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user