Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: runtime/vm/benchmark_test.cc

Issue 10854197: A round of edits to make mirrors.dart more like our current working (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/benchmark_test.h" 5 #include "vm/benchmark_test.h"
6 6
7 #include "bin/file.h" 7 #include "bin/file.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 22 matching lines...) Expand all
33 33
34 34
35 // 35 //
36 // Measure compile of all functions in dart core lib classes. 36 // Measure compile of all functions in dart core lib classes.
37 // 37 //
38 BENCHMARK(CorelibCompileAll) { 38 BENCHMARK(CorelibCompileAll) {
39 Timer timer(true, "Compile all of Core lib benchmark"); 39 Timer timer(true, "Compile all of Core lib benchmark");
40 timer.Start(); 40 timer.Start();
41 const Error& error = Error::Handle(benchmark->isolate(), 41 const Error& error = Error::Handle(benchmark->isolate(),
42 Library::CompileAll()); 42 Library::CompileAll());
43 if (!error.IsNull()) {
44 OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s",
45 error.ToErrorCString());
46 }
43 EXPECT(error.IsNull()); 47 EXPECT(error.IsNull());
44 timer.Stop(); 48 timer.Stop();
45 int64_t elapsed_time = timer.TotalElapsedTime(); 49 int64_t elapsed_time = timer.TotalElapsedTime();
46 benchmark->set_score(elapsed_time); 50 benchmark->set_score(elapsed_time);
47 } 51 }
48 52
49 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64 53 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64
50 54
51 55
52 // 56 //
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("StackFrameTest")); 349 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("StackFrameTest"));
346 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL); 350 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
347 EXPECT_VALID(result); 351 EXPECT_VALID(result);
348 int64_t elapsed_time = 0; 352 int64_t elapsed_time = 0;
349 result = Dart_IntegerToInt64(result, &elapsed_time); 353 result = Dart_IntegerToInt64(result, &elapsed_time);
350 EXPECT_VALID(result); 354 EXPECT_VALID(result);
351 benchmark->set_score(elapsed_time); 355 benchmark->set_score(elapsed_time);
352 } 356 }
353 357
354 } // namespace dart 358 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698