Closed Bug 703419 Opened 13 years ago Closed 13 years ago

Adjust perf API to be simpler and less confusing!

Categories

(addons.mozilla.org Graveyard :: API, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: andy+bugzilla)

References

Details

Please read carefully! :) Right now it has FKs and multiple queries and all kinds of stuff. Jmaher is adjusting his end to send requests that look like this: > {'os':'WINNT', 'version':'6.2', 'platform':'x86', 'product':'firefox', 'product_version':11.0, 'addon_id':31415, 'average': 5.56, 'test': 'ts'} Valid values are: os is one of: WINNT, Darwin, Linux version is: depends on OS, a string, no verification on AMO side platform is one of: x86, x86_64 product is one of: firefox product_version is: depends on product, a string, no verification on AMO side average is: the time it took to run the test in seconds. a float test is one of: ts When a request comes in, basically we want to do: > os = select_or_create(/*os stuff*/) # table: perf_osversions > product = select_or_create(/*product stuff*/) # table: perf_appversions > insert_or_replace(/*add-on stuff, using os and product FKs from above */) # table: perf_results As before, if addon_id is null in the request, it's still stored in the table and considered a baseline performance number. If one of the verified fields above doesn't match, server will respond with a 400 error and some kind of helpful message There are no FKs from the perf_* tables to any other tables in AMO, so feel free to just truncate the tables and replace with this new data instead of the 'fx', 'win32', etc. stuff that is there. Note that we need to modify the perf_osversions table to add an `platform` column to differentiate architecture (eg. x86).
Blocks: 690595
Presumably we can just remove the old API?
I would think we could remove the old API once we start using the new one
Priority: -- → P2
Agreed, no need to support both.
Should this be using the same Oauth authentication as before?
Yes please
> Note that we need to modify the perf_osversions table to add an `platform` column > to differentiate architecture (eg. x86). Whats the name column in perf_osversions for then? Should we just rename it?
Name is only used for displaying data (it's the friendly name). We should keep it and use it and if it's null just show users the ugly name. Eg. (WINNT 5.1 vs Windows XP). We could throw a little logic in there to convert "MacOSX to Mac OS X" automatically and save ourselves having to fill in the names for that platform. Open to ideas. :) Also, I like how WINNT 6.1 == Windows 7
In my db: mysql> show create table perf_appversions; | perf_appversions | CREATE TABLE `perf_appversions` ( ... `app` enum('fx') DEFAULT NULL, Meaning product has to be fx, not firefox.
https://github.com/mozilla/zamboni/commit/a44880 amo-oauth updated. Once you've setup your OAuth token the API is: amo.perf({'os':'WINNT', 'version':'1.23', 'platform': 'x86_64', 'product': 'fx', 'product_version': '4.2.6', 'average': 1.3, 'test': 'ts', 'addon_id': 22})
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
for the record, the app enum was removed and it's now a varchar. 'firefox' is correct in this case.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.