diff options
Diffstat (limited to 'deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc')
-rw-r--r-- | deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc b/deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc index c75fde492e..e74152a5fd 100644 --- a/deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc +++ b/deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc @@ -156,6 +156,19 @@ TEST_F(GCIdleTimeHandlerTest, DoScavengeLowScavengeSpeed) { } +TEST_F(GCIdleTimeHandlerTest, DoScavengeLowAllocationRate) { + GCIdleTimeHandler::HeapState heap_state = DefaultHeapState(); + heap_state.used_new_space_size = kNewSpaceCapacity; + heap_state.new_space_allocation_throughput_in_bytes_per_ms = + GCIdleTimeHandler::kLowAllocationThroughput - 1; + int idle_time_ms = 16; + EXPECT_TRUE(GCIdleTimeHandler::ShouldDoScavenge( + idle_time_ms, heap_state.new_space_capacity, + heap_state.used_new_space_size, heap_state.scavenge_speed_in_bytes_per_ms, + heap_state.new_space_allocation_throughput_in_bytes_per_ms)); +} + + TEST_F(GCIdleTimeHandlerTest, DoScavengeHighScavengeSpeed) { GCIdleTimeHandler::HeapState heap_state = DefaultHeapState(); heap_state.used_new_space_size = kNewSpaceCapacity; |