Closed Bug 1040708 Opened 11 years ago Closed 11 years ago

Use the preset workloads defined in b2gpopulate

Categories

(Testing Graveyard :: Eideticker, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davehunt, Assigned: gakiwate)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 1040705 will introduce preset workload quantities, which we should use in Eideticker instead of hard-coded values.
Hey Gautam, this would be a nice quick one to try doing after you've finished up with bug 1040705
Assignee: nobody → gautam.akiwate
(In reply to William Lachance (:wlach) from comment #1) > Hey Gautam, this would be a nice quick one to try doing after you've > finished up with bug 1040705 Can you post a quick summary as to what needs to be done exactly?
Flags: needinfo?(wlachance)
Hey Gautam, pretty simple. We need to replace "magic" numbers we're passing to b2gpopulate with ones that you're adding to b2gpopulate. Here's an example: https://github.com/mozilla/eideticker/blob/master/src/eideticker/eideticker/b2gtestmixins.py#L19 We should replace this with the values that you're putting into bug 1040705. Do "git grep device.b2gpopulate" to find the other instances. I think in most cases they should be from the light workload?
Flags: needinfo?(wlachance)
Sounds good. Will do this once, davehunt gives a go ahead on the earlier patch.
gakiwate@ubuntu:~/Projects/eideticker$ grep -r "self.device.b2g" . ./src/eideticker/eideticker/b2gtestmixins.py: self.device.b2gpopulate.populate_contacts( ./src/eideticker/eideticker/b2gtestmixins.py: self.device.b2gpopulate.populate_messages(200, restart=False) ./src/tests/b2g/launching/gallery.py: self.device.b2gpopulate.populate_pictures(self.picture_count) ./src/tests/b2g/launching/music.py: self.device.b2gpopulate.populate_music( ./src/tests/b2g/scrolling/callog.py: self.device.b2gpopulate.populate_calls(100, restart=False)
Attachment #8462240 - Flags: review?(wlachance)
Attachment #8462240 - Flags: review?(wlachance)
Comment on attachment 8462240 [details] [diff] [review] Bug-1040708-Use-the-preset-workloads-defined-in-b2gp.patch Review of attachment 8462240 [details] [diff] [review]: ----------------------------------------------------------------- r- due to the change in values. If we want to standardise on the light workload, we should make sure we notify the perf team and anybody consuming the results as these are likely to be affected. ::: src/tests/b2g/launching/gallery.py @@ +9,4 @@ > > > class Test(B2GAppStartupTest): > + picture_count = self.device.b2gpopulate.WORKLOADS['light']['picture'] 100 pictures is actually the 'heavy' workload. ::: src/tests/b2g/launching/music.py @@ +11,4 @@ > class Test(B2GAppStartupTest): > > def prepare_app(self): > + music_count = self.device.b2gpopulate.WORKLOADS['light']['music'] 100 tracks is the 'heavy' workload. ::: src/tests/b2g/scrolling/callog.py @@ +12,5 @@ > self.scrolldown_amount = int(testinfo.get('scrolldown_amount')) > > def populate_databases(self): > + self.device.b2gpopulate.populate_calls( > + self.device.b2gpopulate.WORKLOADS['light']['call'], restart=False) 100 calls is the 'medium' workload.
Attachment #8462240 - Flags: review-
Another issue, I just realized is that the WORKLOAD isn't part of the B2GPopulate class. So, self.device.b2gpopulate.WORKLOADS won't work anyway. One solution could be to a add a 'getter' function in the class that gets a specific value based on the workload and the type. Alternatively, WORKLOADS can be brought into the class but it seems it might require a lot of restructuring in the other classes that use WORKLOADS. What would be the better way forward?
Flags: needinfo?(dave.hunt)
Locally this works for me if I add from `b2gpopulate import WORKLOADS` to b2gpopulate/__init__.py
Flags: needinfo?(dave.hunt)
Updated the values.
Attachment #8462240 - Attachment is obsolete: true
Attachment #8465698 - Flags: review?(wlachance)
Comment on attachment 8465698 [details] [diff] [review] Bug-1040708-Use-the-preset-workloads-defined-in-b2gp.patch Review of attachment 8465698 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, though we will have to make the change to b2gpopulate's __init__.py as outlined by Dave in comment 8 (and release a new version of b2gpopulate) before landing this.
Attachment #8465698 - Flags: review?(wlachance) → review+
I have initiated a pull request for Dave with the changes listed in comment 8. https://github.com/mozilla/b2gpopulate/pull/26
Flags: needinfo?(dave.hunt)
Flags: needinfo?(wlachance)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(wlachance)
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: