aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_cache.py
AgeCommit message (Collapse)Author
2014-10-22Fix issue where crosperf can't find local cros_scratch.cmtice
Crosperf was assuming the user always has an NFS home directory, and was looking for the cros_scratch directory there. This makes crosperf use the user's home directory, whether it's NFS or local. Also change --share_users, which also assumed NFS home directories, to --share_cache, which requires specification of the cache path(s) to use. BUG=None TEST=Tested this with my new local homedir. Change-Id: I28d15467dfbd25b8b237cefa2979d3fd9464a7a7 Reviewed-on: https://chrome-internal-review.googlesource.com/179978 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-10-21Fix assumption that 'graph' results field is non-null.cmtice
Crosperf dies handling the results of the graphics test, because the 'graph' field in the results is null and crosperf was expecting it to be non-null. This fixes that problem. BUG=chromium:424623 TEST=Ran graphics test with this fix and it no longer crashes. Change-Id:I6764e7c38db5d1913109948d5f4798bdf5d6fb7c Reviewed-on: https://chrome-internal-review.googlesource.com/180212 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-07-09Update and expand regression tests for results_cache.pycmtice
BUG=None TEST=Ran regression tests successfully. Ran 'normal' crosperf tests successfully as well. Change-Id: Ib3387cb63f1050cc0d561cc676d91be2334e0c79 Reviewed-on: https://chrome-internal-review.googlesource.com/166133 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-04-24Tell users where results files are stored.cmtice
This updates the output messages to actually tell users where the results files are stored, especially the perf.data and perf.report files. BUG=None TEST=Ran Crosperf with these changes. Change-Id: I4030d8fbf47c0a313e0ab349da9c4d201f946d11 Reviewed-on: https://chrome-internal-review.googlesource.com/161486 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-04-21Clean up Crosperf options and help.cmtice
Crosperf's help was completely out of date and incorrect. Fixed that. Also, I cleaned up the options, removed some that were no longer appropriate or not ever used, and made some options global-only. Also removed all references to pyauto. We no longer use or run pyauto tests. Option changes: Completely removed outlier_range (it was not actually doing anything), key_results_only (applied only to pyauto tests), use_test_that (not needed now that we're not using pyauto) and md5sum (never used). Made the following options global-only: rm_chroot_tmp, perf_args, logging_level, show_all_results, board. Removed 'build' from global settings and made it an image-only setting (it made no sense as a global setting). I also adjusted the unittests to work with these changes. BUG=None TEST=I tested all the options in all their various positions; I tested with and wtihout caching; and I tested local and official images. I also ran the unittests. Everything works. Change-Id: I7653663f65c0a3363a1904c0220f1066e72c7f9d Reviewed-on: https://chrome-internal-review.googlesource.com/160758 Reviewed-by: Bhaskar Janakiraman <bjanakiraman@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-04-04Check for 'significant' results at report generation instead of caching.cmtice
The current implementation of the option that masks unimportant results discards the uninteresting results before caching the test results. After further thought, that was not the right design choice. Among other things it can cause confusing results, such as seen in issue 357346. We should always cache all the results, and do the result filtering during report generation. This CL makes that change. BUG=357346,357343 TEST=Ran crosperf tests with and without cache hits, and with and without entreies in the json file. It all seems to work as expected. Change-Id: I778e5614c73bf751ebaa2d4606af636275247c60 Reviewed-on: https://chrome-internal-review.googlesource.com/159108 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-03-25Update to use "working" version of perf for now.cmtice
This is a temporary fix, until we can figure out why the 'normal' version of 'perf' is not properly symbolizing ChromeOS perf data. This CL commits a version of the 'perf' binary (based on perf 3.13) that does properly symbolize ChromeOS perf data files. It also updates crosperf to copy this working perf binary into the chroot (in /tmp) and to use it when generating the perf report. Work to track down and fix the real problem is ongoing, but in the meantime this allows Crosperf users to get meaningful perf reports for ChromeOS. BUG=None TEST=Tested Crosperf using this patch and generating perf reports. Change-Id: Ia8dd157b88d37a897eb9becf8fa444de41e88873 Reviewed-on: https://chrome-internal-review.googlesource.com/157756 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-03-14Add --logging_level option to crosperf.cmtice
Add --logging_level={verbose, average, quiet} option to crosperf, optionally reducing the amount of logging output. "verbose" gives the same output Crosperf always gave; "quiet" gives minimal output, and "average" is in the middle. The default for now is "verbose". Doing this also involved adding logging levels to the command_executer, and to image_chromeos (again, with the default being "verbose"). BUG=None TEST=Tested all three levels of logging, with and without having to reimage the DUT. It all worked properly. Change-Id: Icf8c9a6831fe25202adcb624c6c7e1d1a7ac25a5 Reviewed-on: https://chrome-internal-review.googlesource.com/156883 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-03-06Fix bug introduced with the --show_all_results flag, using cache.cmtice
The call to self._ProcessResults is supposed to take the show_all_results flag as an argument. This was overlooked in the read-it-out-of-the-cache path when this change was first introduced. This CL fixes that. BUG=None TEST=I tested cached and non-cached runs, with and without the --show_all_results option. Everything worked as it should. Change-Id: Ibf8f206406b0a4535d48b598709e62135289f993 Reviewed-on: https://chrome-internal-review.googlesource.com/156367 Reviewed-by: Yunlian Jiang <yunlian@google.com> Tested-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com>
2014-03-05Fix problem with looking for 'perf' in the wrong directory.cmtice
BUG=None TEST=Tested with old and new chroots; seems to work. Change-Id: Id1a7fc9d6b1dea0b96fe51032bb25d4722dd8b48 Reviewed-on: https://chrome-internal-review.googlesource.com/156381 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-02-20Add 'build' settings option and xbuddy image format.cmtice
This patch updates Crosperf to add the 'build' tag in the experiment file, and to allow that field to contain xbuddy syntax for using trybot and/or official builds in the test runs. It also adds a bit more checking to make sure we have everything necessary for running 'cros flash' before attempting to use it. BUG=None TEST=I have run this using an experiment file that compares a local image, a trybot image and an official image against each other. It all worked. Change-Id: Ia896799061508fb5718a3201b1599d8622de0b3f Reviewed-on: https://chrome-internal-review.googlesource.com/154097 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-02-12Minor Crosperf fixes and cleanups.cmtice
Fix crosperf so that it doesn't try to look for a default result (from the json file) if the telemetry test failed altogether. Also fix it so that if it can't find the default result (on a successful run), it returns all the results, rather than exiting with a backtrace. Also add units to results. BUG=None TEST=Tested these fixes on my system. They appear to work as desired now. Change-Id: I86099a1174c4d91d7d92a5aeea0792c68fa8dbbb Reviewed-on: https://chrome-internal-review.googlesource.com/154114 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-12-13Fix bug with Telemetry results names.cmtice
Some Telemetry tests return results that have the same 'description' name, but different 'graph' names. We were only using the description names, so we were losing some Telemetry measurements in our reports. This CL fixes that. BUG=None TEST=Ran this on with smoothness.top_25. Was missing some results before this change; after, the results are all there. Change-Id: Ibcbe31da5f2860c494cbc8364b0a720d1c50169c Reviewed-on: https://chrome-internal-review.googlesource.com/150215 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-12-10Use default results for Telemetry tests; add option to use all results.cmtice
When running telemetry_Crosperf, use the json file of report defaults to determine which results to actually include in the report. This CL also adds a flag to Crospref, --show_all_results=True, that allows the user to override the defaults and generate a report showing all the values. BUG=None TEST=Tested this both with and without the --show_all_results flag. It works as expected for me. Change-Id: I91364572ebdf3d54bb8b408fbd5a2580923f6829 Reviewed-on: https://chrome-internal-review.googlesource.com/149457 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-12-07Check for file before prepending directory path.cmtice
Sometimes _GetDataMeasurementsFiles returns the file with the full directory path, and sometimes it doesn't. We were assuming it always did not. This patch checks to see if we can already find the file before attempting to prepend the directory path. BUG=None TEST=Tested this in the nightly infrastructure tests area, where we were seeing the problem. This fixed that problem. (Before this fix we were not seeing the successful test results; after it we are.) Change-Id: Ic0a2df4c9aff7b820f652f7ecad56976ed97a4b0 Reviewed-on: https://chrome-internal-review.googlesource.com/149256 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-12-02Add the ability to pass arguments through test_that to Telemetry'scmtice
run_benchmark. BUG=None TEST=I have tested this with my own crosperf, and test_that is passing the arguments along properly. The telemetry_Crosperf autotest also needs to be updated before this completely works. Change-Id: Ic887380b297d966229ac21ba4e7e909e7248fcb0 Reviewed-on: https://chrome-internal-review.googlesource.com/148485 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-11-22Update report generation to check for a 'perf_measurements' file.cmtice
The latest version of telemetry_Crosperf generates a perf_measurements file, containing the test results, rather than a keyval file. This CL checks for perf_measurements, and reads it, if it is there. This change is backwards compatible with the older versions of telemetry_Crosperf that used the keyval file. BUG=None TEST=Tested this with the results only in a keyval file and only in a perf_measurements file. Got acceptable test reports either way. Change-Id: If10a62b2f7fbe89d35c1ebe789a81764c9d134e4 Reviewed-on: https://chrome-internal-review.googlesource.com/148295 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-10-07crosperf: remove cache if --rerun=True is set.Yunlian Jiang
If rerun=True, the data in the cache is useless, so remove it first to avoid data corrupture. BUG=None TEST=The cache dir is removed. Change-Id: I59b219c57cc99aaea7a734ef6e7fd91007cedfd3 Reviewed-on: https://chrome-internal-review.googlesource.com/146065 Reviewed-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2013-08-22Make test_that available for running tests.Caroline Tice
Add a new flag, --use_test_that=True/False, to crosperf, to allow users to tell crosperf to use the test_that script rather than the run_remote_tests.sh script for running their tests. BUG=None TEST=Tested with and without the flag, to verify that it does the right thing. Change-Id: I1a040d23adbf364b4a47320d9fd759a2d46e6689 Reviewed-on: https://gerrit-int.chromium.org/43109 Reviewed-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-08-15Fix results processing to handle "JSON.stringify" in Telemetry results.Caroline Tice
This is the same as the previous CL; I had to abandon the previous CL because it erroneously depended on a different abandoned CL, so it refused to commit. BUG=none TEST=I ran the telemetry tests with the modification and now ALL of them give good output (before only about half of them did). Change-Id: I567f51176c522bc1c41676f6dc560f3827b9cef4 Reviewed-on: https://gerrit-int.chromium.org/42930 Reviewed-by: Bhaskar Janakiraman <bjanakiraman@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-08-07Initialize machine_id_checksum. Make unlocking unlocked machine a warning.Caroline Tice
Fix issues causing errors in nightly tester: Attempting to use machine_id_checksum when it hasn't been initialized; and attempting to unlock an already unlocked machine causes a fatal error. Change-Id: Ia149953d4e25c7abf97a189bb5fdd129de865c34 Reviewed-on: https://gerrit-int.chromium.org/42489 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-06-06Adding support of telemetry to crosperfYunlian Jiang
BUG=None TEST=run crosperf with pyauto/telemetry test with/without cache. all pass. Change-Id: If07ac020a9107a79d5780a58fd6dcc924d07f07f Reviewed-on: https://gerrit-int.chromium.org/36594 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com> Reviewed-on: https://gerrit-int.chromium.org/39241 Reviewed-by: Yunlian Jiang <yunlian@google.com>
2013-03-28Add exe permission to groups for the cache dir.Yunlian Jiang
So others can open the cache dir BUG=None TEST=run crosperf, the permission of the cache dir shown as drwx--x--- Change-Id: Iadc5519679f2820f047e17c10429205636e65f5b Reviewed-on: https://gerrit-int.chromium.org/34614 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2013-03-27Remove unrelated /tmp from crosperf report.Yunlian Jiang
This bug happens when we move the invocation of generate_test_report into chroot. The source dir did not change accordingly, so it cannot remove the /tmp stuff anymore. BUG=None TEST=The /tmp/... stuff is removed on both cache and non cached case. Change-Id: I29dac68eecf0ff1d265f2a3f004627c30962e228 Reviewed-on: https://gerrit-int.chromium.org/34407 Reviewed-by: asharif <asharif@google.com> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2013-03-15Cleaned up directory after copy of tools from perforce directoryLuis Lozano
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
2012-12-20Synced repos to: 64740Ahmad Sharif
2012-10-09Synced repos to: 63271Ahmad Sharif
2012-05-24Synced repos to: 60736Ahmad Sharif
2012-05-23Synced repos to: 60708Ahmad Sharif
2012-05-18Synced repos to: 60597Ahmad Sharif
2012-05-18Synced repos to: 60588Ahmad Sharif
2012-05-14Synced repos to: 60457Ahmad Sharif
2012-05-07Synced repos to: 60208Ahmad Sharif
2012-03-01Synced repos to: 58839Ahmad Sharif
2012-02-02Synced repos to: 58208Ahmad Sharif