From 873a0b082b38b32760401cca3cec2e5d693fe853 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 24 Apr 2014 17:00:03 -0700 Subject: [PATCH] chore: move perf tests to benchmark directory --- {perf => benchmark}/_perf.dart | 0 {perf => benchmark}/dom/_perf.dart | 0 {perf => benchmark}/dom/compile_perf.dart | 0 {perf => benchmark}/invoke_perf.dart | 2 +- {perf => benchmark}/lexer_perf.dart | 0 {perf => benchmark}/loop_perf.dart | 0 {perf => benchmark}/pubspec.lock | 0 {perf => benchmark}/pubspec.yaml | 0 {perf => benchmark}/watch_group_perf.dart | 2 +- karma-perf.conf.js | 4 ++-- scripts/analyze.sh | 2 +- scripts/env.sh | 3 +++ scripts/travis/build.sh | 8 ++++---- 13 files changed, 12 insertions(+), 9 deletions(-) rename {perf => benchmark}/_perf.dart (100%) rename {perf => benchmark}/dom/_perf.dart (100%) rename {perf => benchmark}/dom/compile_perf.dart (100%) rename {perf => benchmark}/invoke_perf.dart (98%) rename {perf => benchmark}/lexer_perf.dart (100%) rename {perf => benchmark}/loop_perf.dart (100%) rename {perf => benchmark}/pubspec.lock (100%) rename {perf => benchmark}/pubspec.yaml (100%) rename {perf => benchmark}/watch_group_perf.dart (99%) diff --git a/perf/_perf.dart b/benchmark/_perf.dart similarity index 100% rename from perf/_perf.dart rename to benchmark/_perf.dart diff --git a/perf/dom/_perf.dart b/benchmark/dom/_perf.dart similarity index 100% rename from perf/dom/_perf.dart rename to benchmark/dom/_perf.dart diff --git a/perf/dom/compile_perf.dart b/benchmark/dom/compile_perf.dart similarity index 100% rename from perf/dom/compile_perf.dart rename to benchmark/dom/compile_perf.dart diff --git a/perf/invoke_perf.dart b/benchmark/invoke_perf.dart similarity index 98% rename from perf/invoke_perf.dart rename to benchmark/invoke_perf.dart index 524b2a56f..e3a400a3f 100644 --- a/perf/invoke_perf.dart +++ b/benchmark/invoke_perf.dart @@ -1,4 +1,4 @@ -library angular.perf.invoke; +library angular.benchmarks.invoke; import 'package:benchmark_harness/benchmark_harness.dart'; diff --git a/perf/lexer_perf.dart b/benchmark/lexer_perf.dart similarity index 100% rename from perf/lexer_perf.dart rename to benchmark/lexer_perf.dart diff --git a/perf/loop_perf.dart b/benchmark/loop_perf.dart similarity index 100% rename from perf/loop_perf.dart rename to benchmark/loop_perf.dart diff --git a/perf/pubspec.lock b/benchmark/pubspec.lock similarity index 100% rename from perf/pubspec.lock rename to benchmark/pubspec.lock diff --git a/perf/pubspec.yaml b/benchmark/pubspec.yaml similarity index 100% rename from perf/pubspec.yaml rename to benchmark/pubspec.yaml diff --git a/perf/watch_group_perf.dart b/benchmark/watch_group_perf.dart similarity index 99% rename from perf/watch_group_perf.dart rename to benchmark/watch_group_perf.dart index 5d518d29c..4eb9c065f 100644 --- a/perf/watch_group_perf.dart +++ b/benchmark/watch_group_perf.dart @@ -1,4 +1,4 @@ -library angular.perf.watch_group; +library angular.benchmarks.watch_group; import '_perf.dart'; import 'package:angular/change_detection/dirty_checking_change_detector.dart'; diff --git a/karma-perf.conf.js b/karma-perf.conf.js index 34b6d2b12..cce806145 100644 --- a/karma-perf.conf.js +++ b/karma-perf.conf.js @@ -8,8 +8,8 @@ module.exports = function(config) { // all tests must be 'included', but all other libraries must be 'served' and // optionally 'watched' only. files: [ - 'perf/dom/*.dart', - 'perf/*_perf.dart', + 'benchmark/dom/*.dart', + 'benchmark/*_perf.dart', 'test/config/filter_tests.dart', {pattern: '**/*.dart', watched: true, included: false, served: true}, 'packages/browser/dart.js', diff --git a/scripts/analyze.sh b/scripts/analyze.sh index 220678408..8e3f7aab4 100755 --- a/scripts/analyze.sh +++ b/scripts/analyze.sh @@ -16,7 +16,7 @@ $DARTANALYZER --version echo // generated file > $OUT for FILE in $(ls lib/angular.dart \ - perf/*_perf.dart \ + benchmarks/*_perf.dart \ test/*_spec.dart \ test/*/*_spec.dart \ lib/change_detection/change_detection.dart \ diff --git a/scripts/env.sh b/scripts/env.sh index dd7d6fab3..fecc7ec40 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -37,6 +37,9 @@ export CHROME_BIN=${CHROME_BIN:-"google-chrome"} export PATH=$PATH:$DARTSDK/bin export NGDART_SCRIPT_DIR=$(dirname $(readlink -f ${BASH_SOURCE[0]})) +if [ -n $NGDART_SCRIPT_DIR ]; then + export NGDART_SCRIPT_DIR=./scripts +fi export NGDART_BASE_DIR=$(dirname $NGDART_SCRIPT_DIR) echo '*********' diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index ddbeed482..242d6a9a0 100755 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -78,10 +78,10 @@ else $NGDART_SCRIPT_DIR/changelog/; ( - echo '----------------' - echo '-- TEST: perf --' - echo '----------------' - cd $NGDART_BASE_DIR/perf + echo '---------------------' + echo '-- TEST: benchmark --' + echo '---------------------' + cd $NGDART_BASE_DIR/benchmark $PUB install for file in *_perf.dart; do