[perfdocs] Move raptor-specific code out of the core perfdocs code
Categories
(Testing :: Performance, task, P1)
Tracking
(firefox78 fixed)
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.
Comment 1•5 years ago
•
|
||
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?
Reporter | ||
Comment 2•5 years ago
|
||
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.
Assignee | ||
Comment 3•5 years ago
|
||
Comment 5•5 years ago
|
||
bugherder |
Description
•