WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
76680
run-perf-tests should support --test-results-server option
https://bugs.webkit.org/show_bug.cgi?id=76680
Summary
run-perf-tests should support --test-results-server option
Ryosuke Niwa
Reported
2012-01-19 18:07:40 PST
I've considered doing this using curl but hard-coding the exact URL, format, etc... into master.cfg seemed inflexible and fragile at best. So I'm adding --upload-json option to run-perf-test instead just like run-webkit-tests supports --test-results-server.
Attachments
adds the option
(18.05 KB, patch)
2012-01-19 19:46 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Fixed per Dirk's comment
(18.40 KB, patch)
2012-01-19 20:55 PST
,
Ryosuke Niwa
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Pranke
Comment 1
2012-01-19 18:42:13 PST
If they do the same thing, it seems like the options should probably have the same name?
Ryosuke Niwa
Comment 2
2012-01-19 19:09:23 PST
(In reply to
comment #1
)
> If they do the same thing, it seems like the options should probably have the same name?
I guess we can do that though webkit-perf is not exactly "test result server".
Dirk Pranke
Comment 3
2012-01-19 19:27:29 PST
Feel free to change the name in run-webkit-tests to something better instead; I have no preference here.
Ryosuke Niwa
Comment 4
2012-01-19 19:46:06 PST
Created
attachment 123244
[details]
adds the option
Dirk Pranke
Comment 5
2012-01-19 20:30:36 PST
Comment on
attachment 123244
[details]
adds the option View in context:
https://bugs.webkit.org/attachment.cgi?id=123244&action=review
> Tools/Scripts/webkitpy/common/net/file_uploader.py:92 > + self._uplad_data(content_type, filesystem.read_text_file(filename))
typo: "uplad_data".
> Tools/Scripts/webkitpy/common/net/file_uploader.py:98 > + file_objs.append(('file', filename, filesystem.read_text_file(filename)))
The previous code was opened as binary. Was that a bug? Seems like it probably was since we're uploading json data ...
> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:324 > + # Set uploading timeout in case appengine server is having problem.
Nit: "having problems"
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:118 > + self._printer.write("Build not up to date for %s" % self._port._path_to_driver())
why are you changing the _log calls to self._printer calls? If the printer was initialized properly, the log messages should show up there anyway, and you're losing the different log levels this way.
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:138 > + return -2
Is there significance to these values? Should you be logging messages or something?
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:157 > except:
I realize you didn't change this, but bare exception catches are usually a bad idea. Please make this more specific while you're in here.
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:172 > + except Exception, error:
same comment, except you did write this one :).
Ryosuke Niwa
Comment 6
2012-01-19 20:53:32 PST
Comment on
attachment 123244
[details]
adds the option View in context:
https://bugs.webkit.org/attachment.cgi?id=123244&action=review
>> Tools/Scripts/webkitpy/common/net/file_uploader.py:92 >> + self._uplad_data(content_type, filesystem.read_text_file(filename)) > > typo: "uplad_data".
Fixed.
>> Tools/Scripts/webkitpy/common/net/file_uploader.py:98 >> + file_objs.append(('file', filename, filesystem.read_text_file(filename))) > > The previous code was opened as binary. Was that a bug? Seems like it probably was since we're uploading json data ...
Yeah, it was probably a bug.
>> Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:324 >> + # Set uploading timeout in case appengine server is having problem. > > Nit: "having problems"
Fixed.
>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:118 >> + self._printer.write("Build not up to date for %s" % self._port._path_to_driver()) > > why are you changing the _log calls to self._printer calls? If the printer was initialized properly, the log messages should show up there anyway, and you're losing the different log levels this way.
The use of _log was an error. I never intended to use _log anywhere in the code.
>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:138 >> + return -2 > > Is there significance to these values? Should you be logging messages or something?
No, I just want to make the debugging easier when failures happen on a bot. _generate_json and _upload_json should each log some error when they return False.
>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:157 >> except: > > I realize you didn't change this, but bare exception catches are usually a bad idea. Please make this more specific while you're in here.
Sure, fixed.
>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:172 >> + except Exception, error: > > same comment, except you did write this one :).
I don't think I can make this one more specific. We need to catch any error here in order to avoid blowing up inside _upload_json. It's also too verbose to list all exceptions urllib, socket, etc... may throw.
Ryosuke Niwa
Comment 7
2012-01-19 20:55:45 PST
Created
attachment 123249
[details]
Fixed per Dirk's comment
Ryosuke Niwa
Comment 8
2012-01-20 01:26:28 PST
Comment on
attachment 123249
[details]
Fixed per Dirk's comment View in context:
https://bugs.webkit.org/attachment.cgi?id=123249&action=review
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:51 > + _default_branch = 'WebKit trunk'
I'm going to change this to webkit-trunk per corresponding AppEngine change.
Adam Barth
Comment 9
2012-01-20 12:51:13 PST
Comment on
attachment 123249
[details]
Fixed per Dirk's comment View in context:
https://bugs.webkit.org/attachment.cgi?id=123249&action=review
> Tools/Scripts/webkitpy/common/net/file_uploader.py:86 > class FileUploader(object):
Were there no file_uploader unit tests to update? If not, please add some before landing.
> Tools/Scripts/webkitpy/common/net/file_uploader.py:92 > + def upload_single_file(self, filesystem, content_type, filename): > + self._upload_data(content_type, filesystem.read_text_file(filename))
upload_single_file -> upload_single_text_file ?
> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:138 > + return -2
These numbers should probably be named constants. Even better: just log the problem rather than using error codes.
Ryosuke Niwa
Comment 10
2012-01-20 12:55:31 PST
Comment on
attachment 123249
[details]
Fixed per Dirk's comment View in context:
https://bugs.webkit.org/attachment.cgi?id=123249&action=review
>> Tools/Scripts/webkitpy/common/net/file_uploader.py:86 >> class FileUploader(object): > > Were there no file_uploader unit tests to update? If not, please add some before landing.
Unfortunately, it's hard to unit-test these functions because we can't really stub/mock urllib2/socket/NetworkTransaction.
Ryosuke Niwa
Comment 11
2012-01-20 12:57:27 PST
(In reply to
comment #9
)
> (From update of
attachment 123249
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=123249&action=review
>
> > Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:138 > > + return -2 > > These numbers should probably be named constants. Even better: just log the problem rather than using error codes.
Calles emit a error message so we should be able to see them in the console.
Dirk Pranke
Comment 12
2012-01-20 13:43:00 PST
> >> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:118 > >> + self._printer.write("Build not up to date for %s" % self._port._path_to_driver()) > > > > why are you changing the _log calls to self._printer calls? If the printer was initialized properly, the log messages should show up there anyway, and you're losing the different log levels this way. > > The use of _log was an error. I never intended to use _log anywhere in the code. >
Generally, we use _log to print things in python code. Further, the printer class is a confusing, obscure class that probably shouldn't be public and should only be used when you need to print things that aren't a line-at-a-time. Please change these back to _log statements unless there's some other reason you really need access to the printer directly.
Ryosuke Niwa
Comment 13
2012-01-20 14:11:54 PST
Comment on
attachment 123249
[details]
Fixed per Dirk's comment View in context:
https://bugs.webkit.org/attachment.cgi?id=123249&action=review
>> Tools/Scripts/webkitpy/common/net/file_uploader.py:92 >> + self._upload_data(content_type, filesystem.read_text_file(filename)) > > upload_single_file -> upload_single_text_file ?
Done.
>>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:138 >>> + return -2 >> >> These numbers should probably be named constants. Even better: just log the problem rather than using error codes. > > Calles emit a error message so we should be able to see them in the console.
I've changed calls to printer.write by log.error in the callees and replaced these by _EXIT_CODE_* constants.
Ryosuke Niwa
Comment 14
2012-01-20 14:17:38 PST
Committed
r105543
: <
http://trac.webkit.org/changeset/105543
>
Dirk Pranke
Comment 15
2012-01-20 14:40:45 PST
(In reply to
comment #13
)
> I've changed calls to printer.write by log.error in the callees and replaced these by _EXIT_CODE_* constants.
Looks great. Thank you!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug