SteamWar/SpigotCore
Archiviert
13
0

Add TPSWatcher #62

Manuell gemergt
Lixfel hat 9 Commits von TPS nach master 2020-11-07 11:06:32 +01:00 zusammengeführt
8 geänderte Dateien mit 122 neuen und 2 gelöschten Zeilen
Nur Änderungen aus Commit 2c76604bb5 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

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_10_R1.MinecraftServer;

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

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;

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

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;

Datei anzeigen

@ -1,3 +1,22 @@
/*
This file is a part of the SteamWar software.
Veraltet
Review

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;

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

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;

Datei anzeigen

@ -1,3 +1,22 @@
/*
Veraltet
Review

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;

Datei anzeigen

@ -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();
}

Datei anzeigen

@ -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;
Veraltet
Review

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.
Veraltet
Review

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
Veraltet
Review

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();