OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // Tests of sampler functionalities. | 4 // Tests of sampler functionalities. |
5 | 5 |
6 #include "src/libsampler/sampler.h" | 6 #include "src/libsampler/sampler.h" |
7 | 7 |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
| 9 #include "src/base/platform/time.h" |
9 #include "test/cctest/cctest.h" | 10 #include "test/cctest/cctest.h" |
10 | 11 |
11 | 12 |
12 namespace v8 { | 13 namespace v8 { |
13 namespace sampler { | 14 namespace sampler { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 class TestSamplingThread : public base::Thread { | 18 class TestSamplingThread : public base::Thread { |
18 public: | 19 public: |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 CompileRun(sampler_test_source); | 132 CompileRun(sampler_test_source); |
132 v8::Local<v8::Function> function = GetFunction(env.local(), "start"); | 133 v8::Local<v8::Function> function = GetFunction(env.local(), "start"); |
133 | 134 |
134 int32_t repeat_count = 100; | 135 int32_t repeat_count = 100; |
135 v8::Local<v8::Value> args[] = {v8::Integer::New(isolate, repeat_count)}; | 136 v8::Local<v8::Value> args[] = {v8::Integer::New(isolate, repeat_count)}; |
136 RunSampler(env.local(), function, args, arraysize(args), 100, 100); | 137 RunSampler(env.local(), function, args, arraysize(args), 100, 100); |
137 } | 138 } |
138 | 139 |
139 } // namespace sampler | 140 } // namespace sampler |
140 } // namespace v8 | 141 } // namespace v8 |
OLD | NEW |