@Test
void track() {

    assertThat(log.track("db", 1000, 1, 0)).isEqualTo(1);
    PerformanceStat stat = log.performanceStats.get("db");
    assertThat(stat.count).isEqualTo(1);
    assertThat(stat.totalElapsed).isEqualTo(1000);
    assertThat(stat.readEntries).isEqualTo(1);
    assertThat(stat.writeEntries).isEqualTo(0);
    assertThat(log.track("db", 1000, 1, 1)).isEqualTo(2);
    stat = log.performanceStats.get("db");
    assertThat(stat.count).isEqualTo(2);
    assertThat(stat.totalElapsed).isEqualTo(2000);
    assertThat(stat.readEntries).isEqualTo(2);
    assertThat(stat.writeEntries).isEqualTo(1);
    assertThat(log.track("http", 3000, 0, 0)).isEqualTo(1);
    stat = log.performanceStats.get("http");
    assertThat(stat.count).isEqualTo(1);
    assertThat(stat.totalElapsed).isEqualTo(3000);
    assertThat(stat.readEntries).isZero();
    assertThat(stat.writeEntries).isZero();
}