Mayil-AI / bugbug-21dec23

Mozilla Public License 2.0
0 stars 0 forks source link

Use whiteboard tags for finding more perf bugs (hashtag1561) #23

Open vikramsubramanian opened 3 months ago

vikramsubramanian commented 3 months ago

There are some whiteboard tags that are used for performance bugs (e.g. fxperf if I'm not mistaken). We can find more examples of perf bugs by using those tags. )

mayil-ai[bot] commented 3 months ago

Implementation ideas

To implement the feature of using whiteboard tags for finding more performance bugs, you can follow these steps:

Here's a pseudo-code example of how you might modify the whiteboard_keywords function to include a check for performance-related tags:

def whiteboard_keywords(bug):
    # ... existing code ...

    # Define a list of performance-related tags
    perf_tags = ['fxperf', 'perf', 'performance']

    # Filter splits to include only those with performance-related tags
    perf_related_splits = [split for split in splits if any(tag in split for tag in perf_tags)]

    return perf_related_splits

Then, you can use this function within the existing feature extraction process to identify performance bugs. For example, you might create a new feature class that uses the whiteboard_keywords function to classify bugs:

class PerformanceBugs(SingleBugFeature):
    name = "Performance related bugs"

    def __call__(self, bug, **kwargs):
        keywords = whiteboard_keywords(bug)
        return any(keyword in keywords for keyword in ['fxperf', 'perf', 'performance'])

This new feature can then be used in the machine learning model or any other analysis to identify and prioritize performance bugs.

Remember to test the new feature thoroughly to ensure it correctly identifies performance bugs and integrates well with the rest of the system.

Code snippets to check

bugbug → bug_features.py 1. `Lines 117 - 537` This snippet contains the function that processes whiteboard keywords, which are relevant to the issue of finding performance bugs using whiteboard tags. https://github.com/Mayil-AI/bugbug-21dec23/blob/0acd00da46afbb37bd047c0bce06ce7cfad21568/bugbug/bug_features.py#L117-L537
bugbug → bug_snapshot.py 1. `Lines 375 - 376` This snippet shows an example of how whiteboard tags are currently being used in the code, which could be relevant for understanding how to expand the search for performance bugs. https://github.com/Mayil-AI/bugbug-21dec23/blob/0acd00da46afbb37bd047c0bce06ce7cfad21568/bugbug/bug_snapshot.py#L375-L376
ui → changes → src → common.js 1. `Lines 2 - 2957` This snippet from the UI code handles options related to whiteboard tags, which could be relevant for the issue if the UI needs to be updated to include new tags for performance bugs. https://github.com/Mayil-AI/bugbug-21dec23/blob/0acd00da46afbb37bd047c0bce06ce7cfad21568/ui/changes/src/common.js#L2-L2957