MemInstrument interface

Пакет: com.hypixel.hytale.builtin.hytalegenerator.engine.performanceinstruments

Файл: com/hypixel/hytale/builtin/hytalegenerator/engine/performanceinstruments/MemInstrument.java

Поля (1)

МодификаторыТипИмя
long BYTES_IN_MEGABYTES

Методы (1)

МодификаторыВозвратСигнатура
record Reportrecord Report(long size_bytes)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.hytalegenerator.engine.performanceinstruments;

class="kw">import javax.annotation.Nonnull;

class="kw">public class="kw">interface MemInstrument {
   long BYTES_IN_MEGABYTES = 1000000L;
   long INT_SIZE = 4L;
   long DOUBLE_SIZE = 8L;
   long BOOLEAN_SIZE = 1L;
   long OBJECT_REFERENCE_SIZE = 8L;
   long OBJECT_HEADER_SIZE = 16L;
   long ARRAY_HEADER_SIZE = 16L;
   long CLASS_OBJECT_SIZE = 128L;
   long ARRAYLIST_OBJECT_SIZE = 24L;
   long VECTOR3I_SIZE = 28L;
   long VECTOR3D_SIZE = 40L;
   long HASHMAP_ENTRY_SIZE = 32L;

   @Nonnull
   MemInstrument.Report getMemoryUsage();

   record Report(long size_bytes) {
      class="kw">public Report {
         assert size_bytes >= 0L;
      }
   }
}