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 initial_heap_state() { | |
Hannes Payer (out of office)
2014/08/22 11:06:30
Can we make a method InitializeHeapState that take
| |
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.mark_compact_speed_in_bytes_per_ms = kMarkCompactSpeed; | |
28 result.incremental_marking_speed_in_bytes_per_ms = kMarkingSpeed; | |
29 return result; | |
30 } | |
31 | |
32 static const size_t kSizeOfObjects = 100 * MB; | |
33 static const size_t kMarkCompactSpeed = 100 * KB; | |
34 static const size_t kMarkingSpeed = 100 * KB; | |
35 | |
36 private: | |
37 GCIdleTimeHandler handler_; | |
38 }; | |
39 } | |
40 } | |
41 #endif // V8_HEAP_UNITTESTS_HEAP_UNITTEST_H_ | |
OLD | NEW |