diff options
author | Evelina Dumitrescu <evelinad@google.com> | 2016-10-08 02:04:13 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-01 18:13:44 -0800 |
commit | 45478f9b3c3d0068eed177df6524c0e7f00a736c (patch) | |
tree | 5e443c207dee49c69dd0cddb5f67c6886016b48f | |
parent | 0228f92f87bc785c3f8184ce79e2d016c95941fc (diff) | |
download | toolchain-utils-45478f9b3c3d0068eed177df6524c0e7f00a736c.tar.gz |
user_activity: Added some parameters to the Dremel SQL scripts.
Used --min_completion_ration=1.0 to to ensure that Dremel queries all
available data and --sql_dialect=GoogleSQL to set up the dialect.
Added session_count > 2000 to extract only the busy profiles.
Added Chrome version as an argument in the command line.
BUG=None
TEST=None
Change-Id: I990499325f8e81ec0ea583077134f1416b56797a
Reviewed-on: https://chrome-internal-review.googlesource.com/294918
Tested-by: Evelina Dumitrescu <evelinad@google.com>
Commit-Queue: Evelina Dumitrescu <evelinad@google.com>
Reviewed-by: Evelina Dumitrescu <evelinad@google.com>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/435917
Commit-Ready: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
-rwxr-xr-x | user_activity_benchmarks/collect_experiment_data.sh | 32 | ||||
-rwxr-xr-x | user_activity_benchmarks/collect_experiment_data_odd_even_session.sh | 36 |
2 files changed, 37 insertions, 31 deletions
diff --git a/user_activity_benchmarks/collect_experiment_data.sh b/user_activity_benchmarks/collect_experiment_data.sh index 78677771..a76cec82 100755 --- a/user_activity_benchmarks/collect_experiment_data.sh +++ b/user_activity_benchmarks/collect_experiment_data.sh @@ -8,24 +8,27 @@ set -e -if [ "$#" -ne 6 ]; then - echo "USAGE: collect_validation_data.sh cwp_table board board_arch " \ - "Chrome_OS_release inclusive_output_file pairwise_inclusive_output_file" +if [ "$#" -ne 7 ]; then + echo "USAGE: collect_experiment_data.sh cwp_table board board_arch " \ + "Chrome_version Chrome_OS_version inclusive_output_file " \ + "pairwise_inclusive_output_file" exit 1 fi readonly TABLE=$1 -readonly INCLUSIVE_OUTPUT_FILE=$5 -readonly PAIRWISE_INCLUSIVE_OUTPUT_FILE=$6 +readonly INCLUSIVE_OUTPUT_FILE=$6 +readonly PAIRWISE_INCLUSIVE_OUTPUT_FILE=$7 readonly PERIODIC_COLLECTION=1 -readonly WHERE_CLAUSE_SPECIFICATIONS="meta.cros.board = '$2' AND " \ - "meta.cros.cpu_architecture = '$3' AND meta.cros.chrome_version LIKE " \ - "'%$4%' AND meta.cros.collection_info.trigger_event = $PERIODIC_COLLECTION" +readonly WHERE_CLAUSE_SPECIFICATIONS="meta.cros.board = '$2' AND \ + meta.cros.cpu_architecture = '$3' AND \ + meta.cros.chrome_version LIKE '%$4%' AND \ + meta.cros.version = '$5' AND \ + meta.cros.collection_info.trigger_event = $PERIODIC_COLLECTION AND \ + session.total_count > 2000" # Collects the function, with its file, the object and inclusive count # fraction out of the total amount of inclusive count values. -echo "set sql_dialect GoogleSQL; - +echo " SELECT replace(frame.function_name, \", \", \"; \") AS function, frame.filename AS file, @@ -53,13 +56,13 @@ HAVING inclusive_count_fraction > 0.0 ORDER BY inclusive_count_fraction DESC; -" | dremel --output=csv > "$INCLUSIVE_OUTPUT_FILE" +" | dremel --sql_dialect=GoogleSQL --min_completion_ratio=1.0 --output=csv \ + > "$INCLUSIVE_OUTPUT_FILE" # Collects the pair of parent and child functions, with the file and object # where the child function is declared and the inclusive count fraction of the # pair out of the total amount of inclusive count values. -echo "set sql_dialect GoogleSQL; - +echo " SELECT CONCAT(replace(frame.parent_function_name, \", \", \"; \"), \";;\", replace(frame.function_name, \", \", \"; \")) AS parent_child_functions, @@ -86,4 +89,5 @@ HAVING inclusive_count > 0.0 ORDER BY inclusive_count DESC; -" | dremel --output=csv > "$PAIRWISE_INCLUSIVE_OUTPUT_FILE" +" | dremel --sql_dialect=GoogleSQL --min_completion_ratio=1.0 --output=csv > \ + "$PAIRWISE_INCLUSIVE_OUTPUT_FILE" diff --git a/user_activity_benchmarks/collect_experiment_data_odd_even_session.sh b/user_activity_benchmarks/collect_experiment_data_odd_even_session.sh index 9d3f9554..900e582b 100755 --- a/user_activity_benchmarks/collect_experiment_data_odd_even_session.sh +++ b/user_activity_benchmarks/collect_experiment_data_odd_even_session.sh @@ -9,27 +9,28 @@ set -e -if [ $# -lt 7 ]; then - echo "Usage: collect_validation_data.sh cwp_table board board_arch " \ - "Chrome_OS_release odd_even inclusive_output_file " \ - "pairwise_inclusive_output_file" +if [ $# -lt 8 ]; then + echo "Usage: collect_experiment_data_odd_even_session.sh cwp_table board " \ + "board_arch Chrome_version Chrome_OS_version odd_even " \ + "inclusive_output_file pairwise_inclusive_output_file" exit 1 fi readonly TABLE=$1 -readonly INCLUSIVE_OUTPUT_FILE=$6 -readonly PAIRWISE_INCLUSIVE_OUTPUT_FILE=$7 +readonly INCLUSIVE_OUTPUT_FILE=$7 +readonly PAIRWISE_INCLUSIVE_OUTPUT_FILE=$8 readonly PERIODIC_COLLECTION=1 -readonly WHERE_CLAUSE_SPECIFICATIONS="meta.cros.board = '$2' AND " \ - "meta.cros.cpu_architecture = '$3' AND " \ - "meta.cros.chrome_version LIKE '%$4%' AND "\ - "meta.cros.collection_info.trigger_event = $PERIODIC_COLLECTION AND " \ - "MOD(session.id, 2) = $5" +WHERE_CLAUSE_SPECIFICATIONS="meta.cros.board = '$2' AND \ + meta.cros.cpu_architecture = '$3' AND \ + meta.cros.chrome_version LIKE '%$4%' AND \ + meta.cros.version = '$5' AND \ + meta.cros.collection_info.trigger_event = $PERIODIC_COLLECTION AND \ + MOD(session.id, 2) = $6 AND \ + session.total_count > 2000" # Collects the function, with its file, the object and inclusive count # fraction out of the total amount of inclusive count values. -echo "set sql_dialect GoogleSQL; - +echo " SELECT replace(frame.function_name, \", \", \"; \") AS function, frame.filename AS file, @@ -56,13 +57,13 @@ HAVING inclusive_count_fraction > 0.0 ORDER BY inclusive_count_fraction DESC; -" | dremel --output=csv > "$INCLUSIVE_OUTPUT_FILE" +" | dremel --sql_dialect=GoogleSQL --min_completion_ratio=1.0 --output=csv > \ + "$INCLUSIVE_OUTPUT_FILE" # Collects the pair of parent and child functions, with the file and object # where the child function is declared and the inclusive count fraction of the # pair out of the total amount of inclusive count values. -echo "set sql_dialect GoogleSQL; - +echo " SELECT CONCAT(replace(frame.parent_function_name, \", \", \"; \"), \";;\", replace(frame.function_name, \", \", \"; \")) AS parent_child_functions, @@ -90,4 +91,5 @@ HAVING inclusive_count > 0.0 ORDER BY inclusive_count DESC; -" | dremel --output=csv > "$PAIRWISE_INCLUSIVE_OUTPUT_FILE" +" | dremel --sql_dialect=GoogleSQL --min_completion_ratio=1.0 --output=csv > \ + "$PAIRWISE_INCLUSIVE_OUTPUT_FILE" |