| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_HEAP_UNITTESTS_HEAP_UNITTEST_H_ | |
| 6 #define V8_HEAP_UNITTESTS_HEAP_UNITTEST_H_ | |
| 7 | |
| 8 #include "src/heap/gc-idle-time-handler.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | |
| 10 | |
| 11 namespace v8 { | |
| 12 namespace internal { | |
| 13 | |
| 14 class GCIdleTimeHandlerTest : public ::testing::Test { | |
| 15 public: | |
| 16 GCIdleTimeHandlerTest() {} | |
| 17 virtual ~GCIdleTimeHandlerTest() {} | |
| 18 | |
| 19 GCIdleTimeHandler* handler() { return &handler_; } | |
| 20 | |
| 21 GCIdleTimeHandler::HeapState DefaultHeapState() { | |
| 22 GCIdleTimeHandler::HeapState result; | |
| 23 result.contexts_disposed = 0; | |
| 24 result.size_of_objects = kSizeOfObjects; | |
| 25 result.incremental_marking_stopped = false; | |
| 26 result.can_start_incremental_marking = true; | |
| 27 result.sweeping_in_progress = false; | |
| 28 result.mark_compact_speed_in_bytes_per_ms = kMarkCompactSpeed; | |
| 29 result.incremental_marking_speed_in_bytes_per_ms = kMarkingSpeed; | |
| 30 return result; | |
| 31 } | |
| 32 | |
| 33 static const size_t kSizeOfObjects = 100 * MB; | |
| 34 static const size_t kMarkCompactSpeed = 100 * KB; | |
| 35 static const size_t kMarkingSpeed = 100 * KB; | |
| 36 | |
| 37 private: | |
| 38 GCIdleTimeHandler handler_; | |
| 39 }; | |
| 40 } | |
| 41 } | |
| 42 #endif // V8_HEAP_UNITTESTS_HEAP_UNITTEST_H_ | |
| OLD | NEW |