Search in sources :

Example 1 with MemoryRecommendationsCommand.bytesToString

use of org.neo4j.commandline.dbms.MemoryRecommendationsCommand.bytesToString in project neo4j by neo4j.

the class MemoryRecommendationsCommandTest method shouldPrintKilobytesEvenForByteSizeBelowAKiloByte.

@Test
void shouldPrintKilobytesEvenForByteSizeBelowAKiloByte() {
    // given
    long bytesBelowK = 176;
    long bytesBelow10K = 1762;
    long bytesBelow100K = 17625;
    // when
    String stringBelowK = MemoryRecommendationsCommand.bytesToString(bytesBelowK);
    String stringBelow10K = MemoryRecommendationsCommand.bytesToString(bytesBelow10K);
    String stringBelow100K = MemoryRecommendationsCommand.bytesToString(bytesBelow100K);
    // then
    assertThat(stringBelowK).isEqualTo("1k");
    assertThat(stringBelow10K).isEqualTo("2k");
    assertThat(stringBelow100K).isEqualTo("18k");
}
Also used : MemoryRecommendationsCommand.bytesToString(org.neo4j.commandline.dbms.MemoryRecommendationsCommand.bytesToString) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 MemoryRecommendationsCommand.bytesToString (org.neo4j.commandline.dbms.MemoryRecommendationsCommand.bytesToString)1