mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-26 04:05:48 +01:00
Log data load time
This commit is contained in:
parent
a2a9774ce1
commit
f53c5aae76
@ -153,8 +153,11 @@ public class EpicHoppers extends SongodaPlugin {
|
|||||||
public void onDataLoad() {
|
public void onDataLoad() {
|
||||||
// Load data from DB
|
// Load data from DB
|
||||||
this.dataManager.getAsyncPool().execute(() -> {
|
this.dataManager.getAsyncPool().execute(() -> {
|
||||||
|
getLogger().info("loading data...");
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
this.hopperManager.addHoppers(this.dataManager.loadBatch(HopperImpl.class, "placed_hoppers"));
|
this.hopperManager.addHoppers(this.dataManager.loadBatch(HopperImpl.class, "placed_hoppers"));
|
||||||
this.boostManager.loadBoosts(this.dataManager.loadBatch(BoostDataImpl.class, "boosted_players"));
|
this.boostManager.loadBoosts(this.dataManager.loadBatch(BoostDataImpl.class, "boosted_players"));
|
||||||
|
getLogger().info("Loaded " + hopperManager.getHoppers().size() + " hoppers in " + (System.currentTimeMillis() - start) + "ms");
|
||||||
this.hopperManager.setReady();
|
this.hopperManager.setReady();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user