Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index deb9a4922183c7309f386c9181b55ee69392e3ab..c99019f89e8032d8457e915e468829c3cc8d3e62 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -5549,13 +5549,13 @@ TEST(NewSpaceAllocationThroughput2) { |
int time2 = 200; |
size_t counter2 = 2000; |
tracer->SampleAllocation(time2, counter2, 0); |
- size_t bytes = tracer->AllocatedBytesInLast(1000); |
- CHECK_EQ(10000, bytes); |
+ size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ((counter2 - counter1) / (time2 - time1), throughput); |
int time3 = 1000; |
size_t counter3 = 30000; |
tracer->SampleAllocation(time3, counter3, 0); |
- bytes = tracer->AllocatedBytesInLast(100); |
- CHECK_EQ((counter3 - counter1) * 100 / (time3 - time1), bytes); |
+ throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ((counter3 - counter1) / (time3 - time1), throughput); |
} |
@@ -5612,13 +5612,13 @@ TEST(OldGenerationAllocationThroughput) { |
int time2 = 200; |
size_t counter2 = 2000; |
tracer->SampleAllocation(time2, 0, counter2); |
- size_t bytes = tracer->AllocatedBytesInLast(1000); |
- CHECK_EQ(10000, bytes); |
+ size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ((counter2 - counter1) / (time2 - time1), throughput); |
int time3 = 1000; |
size_t counter3 = 30000; |
tracer->SampleAllocation(time3, 0, counter3); |
- bytes = tracer->AllocatedBytesInLast(100); |
- CHECK_EQ((counter3 - counter1) * 100 / (time3 - time1), bytes); |
+ throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ((counter3 - counter1) / (time3 - time1), throughput); |
} |
@@ -5634,11 +5634,11 @@ TEST(AllocationThroughput) { |
int time2 = 200; |
size_t counter2 = 2000; |
tracer->SampleAllocation(time2, counter2, counter2); |
- size_t bytes = tracer->AllocatedBytesInLast(1000); |
- CHECK_EQ(20000, bytes); |
+ size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ(2 * (counter2 - counter1) / (time2 - time1), throughput); |
int time3 = 1000; |
size_t counter3 = 30000; |
tracer->SampleAllocation(time3, counter3, counter3); |
- bytes = tracer->AllocatedBytesInLast(100); |
- CHECK_EQ(2 * (counter3 - counter1) * 100 / (time3 - time1), bytes); |
+ throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
+ CHECK_EQ(2 * (counter3 - counter1) / (time3 - time1), throughput); |
} |