mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-04 01:39:35 +01:00
Adds the variables for
RAM Usage Chunks loaded Entities living
This commit is contained in:
parent
63684efead
commit
2f16beebe4
@ -17,8 +17,9 @@ import java.util.List;
|
||||
* <p>
|
||||
* Placeholder values can be retrieved using the get method.
|
||||
* <p>
|
||||
* Contains following place-holders: tpsscatterday, tpsscatterweek, cpuscatterday, cpuscatterweek, averagetps,
|
||||
* averagetpsday, averagecpuday, averagecpuweek
|
||||
* Contains following place-holders: tpsscatterday, tpsscatterweek, cpuscatterday, cpuscatterweek, averagetps(-week),
|
||||
* averagetpsday, averagecpuday, averagecpuweek, averagememoryday, averagememoryweek, averageentitiesday, averageentitiesweek,
|
||||
* averagechunksday, averagechunkweek
|
||||
*
|
||||
* @author Rsl1122
|
||||
* @since 3.5.2
|
||||
@ -48,17 +49,36 @@ public class TPSPart extends RawData<TPSPart> {
|
||||
addValue("cpuscatterday", cpuScatterDay);
|
||||
addValue("cpuscatterweek", cpuScatterWeek);
|
||||
|
||||
double averageTPSweek = MathUtils.averageDouble(week.stream().map(TPS::getTps));
|
||||
double averageTPSday = MathUtils.averageDouble(day.stream().map(TPS::getTps));
|
||||
double averageTPSWeek = MathUtils.averageDouble(week.stream().map(TPS::getTps));
|
||||
double averageTPSDay = MathUtils.averageDouble(day.stream().map(TPS::getTps));
|
||||
|
||||
double averageCPUweek = MathUtils.averageDouble(week.stream().map(TPS::getCPUUsage));
|
||||
double averageCPUday = MathUtils.averageDouble(day.stream().map(TPS::getCPUUsage));
|
||||
double averageCPUWeek = MathUtils.averageDouble(week.stream().map(TPS::getCPUUsage));
|
||||
double averageCPUDay = MathUtils.averageDouble(day.stream().map(TPS::getCPUUsage));
|
||||
|
||||
addValue("averagetps", FormatUtils.cutDecimals(averageTPSweek));
|
||||
addValue("averagetpsday", FormatUtils.cutDecimals(averageTPSday));
|
||||
long averageUsedMemoryWeek = MathUtils.averageLong(week.stream().map(TPS::getUsedMemory));
|
||||
long averageUsedMemoryDay = MathUtils.averageLong(day.stream().map(TPS::getUsedMemory));
|
||||
|
||||
addValue("averagecpuweek", FormatUtils.cutDecimals(averageCPUweek));
|
||||
addValue("averagecpuday", FormatUtils.cutDecimals(averageCPUday));
|
||||
double averageEntityCountWeek = MathUtils.averageInt(week.stream().map(TPS::getEntityCount));
|
||||
double averageEntityCountDay = MathUtils.averageInt(day.stream().map(TPS::getEntityCount));
|
||||
|
||||
double averageChunksLoadedWeek = MathUtils.averageInt(week.stream().map(TPS::getChunksLoaded));
|
||||
double averageChunksLoadedDay = MathUtils.averageInt(day.stream().map(TPS::getChunksLoaded));
|
||||
|
||||
addValue("averagetps", FormatUtils.cutDecimals(averageTPSWeek)); //Staying for backwards compatibility
|
||||
addValue("averagetpsweek", FormatUtils.cutDecimals(averageTPSWeek));
|
||||
addValue("averagetpsday", FormatUtils.cutDecimals(averageTPSDay));
|
||||
|
||||
addValue("averagecpuweek", FormatUtils.cutDecimals(averageCPUWeek));
|
||||
addValue("averagecpuday", FormatUtils.cutDecimals(averageCPUDay));
|
||||
|
||||
addValue("averagememoryweek", FormatUtils.cutDecimals(averageUsedMemoryWeek));
|
||||
addValue("averagememoryday", FormatUtils.cutDecimals(averageUsedMemoryDay));
|
||||
|
||||
addValue("averageentitiesweek", FormatUtils.cutDecimals(averageEntityCountWeek));
|
||||
addValue("averageentitiesday", FormatUtils.cutDecimals(averageEntityCountDay));
|
||||
|
||||
addValue("averagechunksweek", FormatUtils.cutDecimals(averageChunksLoadedWeek));
|
||||
addValue("averagechunksday", FormatUtils.cutDecimals(averageChunksLoadedDay));
|
||||
}
|
||||
|
||||
public List<TPS> getTpsData() {
|
||||
|
Loading…
Reference in New Issue
Block a user