Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for getUsedMemory (0.11 sec)

  1. src/test/java/org/codelibs/fess/util/MemoryUtilTest.java

            assertEquals("1.024EB", MemoryUtil.byteCountToDisplaySize(FileUtils.ONE_EB));
        }
    
        public void test_getUsedMemory() {
            assertTrue(MemoryUtil.getUsedMemory() >= 0);
        }
    
        public void test_sizeOf() throws Exception {
            // System.out.println("size: " + getObjectSize(""));
            assertEquals(24L, MemoryUtil.sizeOf(Integer.MAX_VALUE));
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/util/MemoryUtil.java

                displaySize = new BigDecimal(size).divide(BigDecimal.valueOf(1000)) + "KB";
            } else {
                displaySize = size + "bytes";
            }
            return displaySize;
        }
    
        public static long getUsedMemory() {
            final Runtime runtime = Runtime.getRuntime();
            final long freeBytes = runtime.freeMemory();
            final long totalBytes = runtime.totalMemory();
            return totalBytes - freeBytes;
        }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/fess/crawler/transformer/FessXpathTransformerTest.java

            long margin = 5000000L;
            System.gc();
            for (int i = 0; i < 30; i++) {
                if (MemoryUtil.getUsedMemory() < current + margin) {
                    break;
                }
                System.gc();
                Thread.sleep(1000L);
            }
            final long usedMemory = MemoryUtil.getUsedMemory();
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Oct 24 13:01:38 UTC 2024
    - 41.3K bytes
    - Viewed (0)
Back to top