Skip to content

Conversation

@PranjalC100
Copy link
Member

@PranjalC100 PranjalC100 commented Jan 7, 2026

Adding Go-storage-tests to NPI framework. This will help us test the performance of Go SDK on the machine in isolation i.e. no GCSFuse involvement.
How to run:

nohup python3 npi.py --benchmarks go-storage-tests --bucket-name BUCKET_NAME--project-id PROJECT_ID --bq-dataset-id DATASET_ID --gcsfuse-version v3.4.0 --iterations=2 &

https://buganizer.corp.google.com/issues/474254631

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @PranjalC100, 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 significantly enhances the NPI benchmarking suite by adding go-storage-tests, which measure raw Google Cloud Storage performance directly, bypassing GCSfuse. This provides a crucial baseline for performance comparisons. The changes involve setting up a new Docker image build process, implementing a Python script to manage the Go-based benchmarks, and integrating these new tests into the existing NPI framework for execution and BigQuery reporting.

Highlights

  • New Benchmark Type: go-storage-tests: Introduced a new benchmark type, go-storage-tests, designed to measure direct Google Cloud Storage (GCS) performance using the Go storage client. These tests provide a baseline by running read operations via both HTTP/1.1 and gRPC protocols, independent of GCSfuse overhead.
  • Automated Docker Image Build: Added a new step to cloudbuild.yaml to automatically build and push a multi-platform Docker image (linux/amd64, linux/arm64) for the go-storage-benchmark. This image encapsulates the Go benchmark tool and its Python orchestration script.
  • Go Storage Benchmark Dockerfile: Created go-storage/go_storage.dockerfile which uses a multi-stage build process. It first builds a Go executable from a specified GitHub repository (custom-go-client-benchmark) and then packages it with a Python runtime and necessary Google Cloud libraries into a slim Python image.
  • Python Orchestration Script: Developed npi/go-storage/go_storage_benchmark.py, a Python script that orchestrates the go-storage-tests. This script handles test data preparation (uploading 128x10MB files to GCS), executes the Go benchmark tool for multiple iterations across HTTP and gRPC, parses the bandwidth results, and uploads them to Google BigQuery.
  • Integration with NPI System: Modified npi/npi.py to integrate the new go-storage-tests into the existing benchmark definition system. This allows the NPI framework to recognize and execute these new tests, directing their results to a dedicated BigQuery table (go_storage_tests).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new go-storage-tests benchmark, including a new Docker image, a Python script for orchestration, and updates to the build and main runner scripts. The implementation is mostly sound, but I've identified a critical issue regarding a dependency on a personal GitHub repository, which presents a security and maintenance risk. I have also provided several suggestions to improve the robustness and style of the new Python benchmark script, such as using the tempfile module for temporary directories and making benchmark output parsing less fragile.


FROM golang:${GO_VERSION} AS builder
WORKDIR /app
RUN git clone https://github.com/kislaykishore/custom-go-client-benchmark.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The Dockerfile clones a repository from a personal GitHub account (https://github.com/kislaykishore/custom-go-client-benchmark.git). This introduces a significant security and maintenance risk, as the repository is not under the control of the project maintainers. It could be removed, altered with breaking changes, or compromised with malicious code at any time. It is strongly recommended to either vendor this dependency or fork it into a repository controlled by your organization.

# run_tests will handle the path. We just need to make sure permissions are executable.
# Docker COPY usually preserves permissions or we can chmod.
else:
repo_url = "https://github.com/kislaykishore/custom-go-client-benchmark"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The script is configured to clone a benchmark tool from a personal GitHub repository (https://github.com/kislaykishore/custom-go-client-benchmark). This is a significant security and reliability risk because the repository is not controlled by the project. The code could be modified with breaking changes, become unavailable, or even be compromised with malicious code. To ensure the security and stability of your build process, this dependency should be vendored or moved to a repository under your organization's control.

@PranjalC100 PranjalC100 marked this pull request as ready for review January 8, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant