• Anup Sharma's avatar
    perf scripts python gecko: Launch the profiler UI on the default browser with the appropriate URL · f208b2c6
    Anup Sharma authored
    All required libraries have been imported and make sure that none of
    them are external dependencies. To achieve this, created a virt env and
    verified.
    
    Modified usage information and added combined command.
    
    Modified the main() function to read the --save-only command-line option
    and set the output_file variable accordingly.
    
    Modified the trace_end() function to check for the output_file variable.
    If it is set, the profiler data is saved to a local file in Gecko
    Profile format, or the profiler.firefox.com is opened on the default
    browser.
    
    Included trace_begin() to initialize the Firefox Profiler and launch the
    default browser to display the profiler.firefox.com.
    
    Added a new function launchFirefox() to start a local server and launch
    the profiler UI on the default browser with the appropriate URL.
    
    Created the "CORSRequestHandler" class to enable Cross-Origin Resource
    Sharing.
    
    Summary:
    
    This integration now includes a exiting feature to conveniently host the
    Gecko Profile data on a local server and open it directly in the default
    web browser.
    
    This means that users can now effortlessly visualize and analyze the
    profiler results with just a single click.
    
    The addition of the --save-only command-line option allows users to save
    the profiler output to a local file in Gecko Profile format, but the
    real highlight lies in the capability to seamlessly launch a local
    server, making the data accessible to Firefox Profiler via a web
    browser.
    
    In addition, it's important to highlight that all data are hosted
    locally, eliminating any concerns about data privacy rules and
    regulations.
    Signed-off-by: default avatarAnup Sharma <anupnewsmail@gmail.com>
    Tested-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/ZNOS0vo58DnVLpD8@yogaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    f208b2c6
gecko.py 13 KB