Add TPSWatcher #62
@ -1,3 +1,22 @@
|
||||
/*
|
||||
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_10_R1.MinecraftServer;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
Lixfel
hat
Licence fehlt Licence fehlt
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_12_R1.MinecraftServer;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
Lixfel
hat
Licence fehlt Licence fehlt
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_14_R1.MinecraftServer;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is a part of the SteamWar software.
|
||||
Lixfel
hat
Licence fehlt Licence fehlt
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_15_R1.MinecraftServer;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
Lixfel
hat
Licence fehlt Licence fehlt
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.MinecraftServer;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
Lixfel
hat
Licence fehlt Licence fehlt
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.core;
|
||||
|
||||
import net.minecraft.server.v1_9_R2.MinecraftServer;
|
||||
|
@ -64,6 +64,7 @@ public class Core extends JavaPlugin{
|
||||
ErrorLogger.init();
|
||||
getServer().getMessenger().registerIncomingPluginChannel(this, "sw:bridge", new BungeeReceiver());
|
||||
getServer().getMessenger().registerOutgoingPluginChannel(this, "sw:bridge");
|
||||
TPSWatcher.init();
|
||||
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,13 @@ public class TPSWatcher {
|
||||
|
||||
private static final double tickDefault = 20.0;
|
||||
|
||||
private static TPSWatcher tps_OneSecond = new TPSWatcher(1000);
|
||||
private static TPSWatcher tps_TenSecond = new TPSWatcher(10000);
|
||||
private static TPSWatcher tps_OneSecond;
|
||||
private static TPSWatcher tps_TenSecond;
|
||||
Lixfel
hat
Da wir weder die statistische Abweichung messen noch die Werte irgendwo hier speichern, ist meiner Meinung nach jegliche Liste hier verkehrt. Es reicht, wenn sich der 10s-Durchschnitt alle 10s aktualisiert und der 1s-Durchschnitt sich sekündlich aktualisiert, da muss nicht jeder Tick da sein => Keine Listen nötig. Ich möchte eine Implementierung ohne jegliche Listen. Da wir weder die statistische Abweichung messen noch die Werte irgendwo hier speichern, ist meiner Meinung nach jegliche Liste hier verkehrt. Es reicht, wenn sich der 10s-Durchschnitt alle 10s aktualisiert und der 1s-Durchschnitt sich sekündlich aktualisiert, da muss nicht jeder Tick da sein => Keine Listen nötig. Ich möchte eine Implementierung ohne jegliche Listen.
YoyoNow
hat
Warum können wir nicht auch die 10s immer passend die letzten 10 Sekunden anzeigt und nicht nach 10 Sekunden dann mal wieder die letzten 10 Sekunden, dass finde ich auch nicht so sinnvoll. Ich überlege mal ob ich das anders machen kann Warum können wir nicht auch die 10s immer passend die letzten 10 Sekunden anzeigt und nicht nach 10 Sekunden dann mal wieder die letzten 10 Sekunden, dass finde ich auch nicht so sinnvoll. Ich überlege mal ob ich das anders machen kann
Lixfel
hat
Weil wir dann 10 Werte cachen müssen. Deshalb. Ist wesentlich aufwändiger und aufwändiger zu warten für einen wesentlich geringeren Vorteil Weil wir dann 10 Werte cachen müssen. Deshalb. Ist wesentlich aufwändiger und aufwändiger zu warten für einen wesentlich geringeren Vorteil
|
||||
|
||||
public static void init() {
|
||||
tps_OneSecond = new TPSWatcher(1000);
|
||||
tps_TenSecond = new TPSWatcher(10000);
|
||||
}
|
||||
|
||||
private long lastTime = System.currentTimeMillis();
|
||||
|
||||
|
Licence fehlt