Closed Bug 1637058 Opened 5 years ago Closed 5 years ago

[perfdocs] Move raptor-specific code out of the core perfdocs code

Categories

(Testing :: Performance, task, P1)

Version 3
task

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: sparky, Assigned: myeongjun.ko)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This bug is for implementing what was discussed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1633890#c5

Specifically, the browsertime specific code needs to be moved out of the core perfdocs code (which is where it is now 2) and into the Raptor framework gatherer 3.

To do this, we need to implement a build_test_descriptions method in the framework gatherers that takes as arguments a test name and a description and returns a document section/chunk for that test.

The method should look something like:

def build_test_description(test_name, test_description=None):
    # Build test description, or modify the given description into a document chunk
    return <DOCUMENT-CHUNK>

For example, if we call it like: build_test_description("amazon", "Browsertime amazon desktop test")

Then, it would return:

>> ret = build_test_description("amazon", "Browsertime amazon desktop test.")
>> ret
Browsertime amazon
^^^^^^^^^^^^^^^^^
Browsertime amazon desktop test.

Note that the _append_rst_section function 1 will also need to be moved into the framework gatherer along with the browsertime specific code below it 2.

Sparky, by what _append_rst_section does it's part of the generation of the document, not gathering. I would keep all the info inside the list of dictionaries self._perfdocs_tree and do it inside the generator to keep gatherer and generator functions separate. If there a good reason why we are doing this?

Appending to the document is part of the core (so that would need to stay), but building the chunk of text that is appended isn't. We should probably rename the raptor gatherer to something like RaptorDocs to make it clearer that it will contain methods that are specific to a particular framework, and not specifically for gathering.

We need to remove the browsertime-specific code out of the core code, it shouldn't be there and this is the best way we could do this. Furthermore, it's possible that other frameworks won't want to use the same style and with this they would be able to modify the test description portion of the document.

Blocks: 1640684
Pushed by gmierz2@outlook.com: https://hg.mozilla.org/integration/autoland/rev/7bb713b8b059 Move raptor-specific code out of the core perfdocs code r=sparky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: