Add startup latency measurement script#4819
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a diagnostic utility designed to quantify the startup performance of gcsfuse. By automating the mounting process and tracking the time taken for the mount point to become active, it provides a reliable way to benchmark startup times under various configurations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Python script, startup_latency.py, designed to measure the startup latency of gcsfuse by monitoring the mount point's device ID. The review feedback highlights critical issues in the process management of measure_startup_latency, including potential deadlocks from calling process.wait() unconditionally, a potential NameError if subprocess.Popen fails, and a potential FileNotFoundError if fusermount is missing. A robust refactoring is suggested to safely handle process execution, timeouts, and cleanup.
50065e5 to
3775d47
Compare
This script measures the startup latency of gcsfuse by launching it in a
subprocess, polling the mount point until its device ID (st_dev) changes,
and recording the elapsed time.
Examples of running the script:
1. With HNS enabled (default):
$ python3 perfmetrics/scripts/startup_latency/startup_latency.py \
--bucket-name geertj-us-central1-a --mount-point ./mnt
Startup latency: 360.27 ms
2. With HNS disabled:
$ python3 perfmetrics/scripts/startup_latency/startup_latency.py \
--bucket-name geertj-us-central1-a --mount-point ./mnt \
--flags="--enable-hns=false"
Startup latency: 28.55 ms
TAG=agy
CONV=cebcc159-cc87-4c47-b800-09dc13fad1ec
3775d47 to
3721839
Compare
charith87
left a comment
There was a problem hiding this comment.
Standalone script. Seems fine.
This script measures the startup latency of gcsfuse by launching it in a
subprocess, polling the mount point until its device ID (st_dev) changes,
and recording the elapsed time.
Examples of running the script:
1. With HNS enabled (default):
$ python3 perfmetrics/scripts/startup_latency/startup_latency.py \
--bucket-name geertj-us-central1-a --mount-point ./mnt
Startup latency: 360.27 ms
2. With HNS disabled:
$ python3 perfmetrics/scripts/startup_latency/startup_latency.py \
--bucket-name geertj-us-central1-a --mount-point ./mnt \
--flags="--enable-hns=false"
Startup latency: 28.55 ms
TAG=agy
CONV=cebcc159-cc87-4c47-b800-09dc13fad1ec
This script measures the startup latency of gcsfuse by launching it in a subprocess, polling the mount point until its device ID (st_dev) changes, and recording the elapsed time.
Examples of running the script:
With HNS enabled (default): $ python3 perfmetrics/scripts/startup_latency/startup_latency.py \ --bucket-name geertj-us-central1-a --mount-point ./mnt Startup latency: 360.27 ms
With HNS disabled: $ python3 perfmetrics/scripts/startup_latency/startup_latency.py \ --bucket-name geertj-us-central1-a --mount-point ./mnt \ --flags="--enable-hns=false" Startup latency: 28.55 ms
TAG=agy
CONV=cebcc159-cc87-4c47-b800-09dc13fad1ec