mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 04:29:05 +00:00
so I didnt know that
This commit is contained in:
@@ -57,7 +57,8 @@ public class CommandDeveloper implements DecreeExecutor {
|
||||
Iris.info(C.DARK_PURPLE + "Engine Status");
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Threads: " + C.LIGHT_PURPLE + engine.getMantle().getDynamicThreads());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Limit: " + C.LIGHT_PURPLE + engine.getMantle().getTectonicLimit());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Plates: " + C.LIGHT_PURPLE + engine.getMantle().getLoadedRegionCount());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Loaded Plates: " + C.LIGHT_PURPLE + engine.getMantle().getLoadedRegionCount());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Plates: " + C.LIGHT_PURPLE + engine.getMantle().getNotClearedLoadedRegions());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic ToUnload: " + C.LIGHT_PURPLE + engine.getMantle().getToUnload());
|
||||
Iris.info(C.DARK_PURPLE + "Tectonic Unload Duration: " + C.LIGHT_PURPLE + Form.duration((long) engine.getMantle().getTectonicDuration()));
|
||||
Iris.info(C.DARK_PURPLE + "Cache Size: " + C.LIGHT_PURPLE + Form.f(IrisData.cacheSize()));
|
||||
|
||||
@@ -33,8 +33,8 @@ public class DynamicPerformanceSVC implements IrisService {
|
||||
protected long loop() {
|
||||
try {
|
||||
if (engine.getMantle().getTectonicLimit() < engine.getMantle().getLoadedRegionCount()){
|
||||
// engine.getMantle().trim(5);
|
||||
// return 2000;
|
||||
engine.getMantle().trim(5);
|
||||
return 2000;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
@@ -301,6 +301,9 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
default double getTectonicLimit(){
|
||||
return Mantle.tectonicLimit.get();
|
||||
}
|
||||
default long getNotClearedLoadedRegions(){
|
||||
return getMantle().getLoadedRegions().size() - getMantle().getToUnload().size();
|
||||
}
|
||||
default double getTectonicDuration(){
|
||||
return getMantle().getAdjustedIdleDuration().get();
|
||||
}
|
||||
|
||||
@@ -388,8 +388,6 @@ public class Mantle {
|
||||
return numberOfEntries * bytesPerEntry;
|
||||
}
|
||||
|
||||
//@Getter
|
||||
//private final AtomicInteger fakeToUnload = new AtomicInteger(0);
|
||||
private final AtomicInteger oldFakeToUnload = new AtomicInteger((0));
|
||||
@Getter
|
||||
private final AtomicDouble adjustedIdleDuration = new AtomicDouble(0);
|
||||
@@ -479,9 +477,12 @@ public class Mantle {
|
||||
if (IrisSettings.get().getPerformance().AggressiveTectonicUnload
|
||||
&& loadedRegions.size() > forceAggressiveThreshold.get()) {
|
||||
|
||||
AtomicInteger dummyLoadedRegions = new AtomicInteger(loadedRegions.size());
|
||||
AtomicInteger regionCountToRemove = new AtomicInteger(0);
|
||||
if (loadedRegions.size() > tectonicLimit.get()){
|
||||
regionCountToRemove.set(loadedRegions.size() - tectonicLimit.get());
|
||||
}
|
||||
|
||||
while (dummyLoadedRegions.get() > tectonicLimit.get()) {
|
||||
for (; regionCountToRemove.get() > 0 ;) {
|
||||
Long[] oldestKey = {null};
|
||||
long[] oldestAge = {Long.MIN_VALUE};
|
||||
|
||||
@@ -502,7 +503,7 @@ public class Mantle {
|
||||
hyperLock.withLong(finalOldestKey, () -> {
|
||||
toUnload.add(finalOldestKey);
|
||||
Iris.debug("Oldest Tectonic Region " + finalOldestKey + " added to unload");
|
||||
dummyLoadedRegions.getAndDecrement();
|
||||
regionCountToRemove.getAndDecrement();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user