Skip to content

Feature 1.5.0#18

Merged
KelCodesStuff merged 9 commits intomainfrom
feature-1.5.0
Sep 29, 2025
Merged

Feature 1.5.0#18
KelCodesStuff merged 9 commits intomainfrom
feature-1.5.0

Conversation

@KelCodesStuff
Copy link
Owner

Summary

Detailed explanation of the baseline loading logic fix.
Error message enhancements and filename improvements.
Updated scheme names for clarity.

Benefits

Eliminates false positives and ensures proper comparisons.
Clear error messages and copy-paste ready commands.
Better debugging and maintainable code.

Testing

All current tests pass.

Breaking Changes

No breaking changes.

Documentation

  • Have you updated README instructions to reflect any code/process changes?

@gemini-code-assist
Copy link

Summary of Changes

Hello @KelCodesStuff, 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 focuses on refining the performance testing framework by standardizing naming conventions for test configurations and schemes, and significantly improving the robustness of baseline management. The updates ensure that performance comparisons are made against the correct baselines, provide clearer error feedback to users, and enhance the overall maintainability and accuracy of the testing suite.

Highlights

  • Test Configuration Renaming: Refactored TestPreset enum cases (e.g., lowRes to graphicsLow, ultraHigh to max) and updated corresponding command-line arguments and Xcode scheme names for improved clarity and consistency across the project.
  • Specific Baseline Loading Logic: Implemented logic to load baselines specific to the current test configuration, eliminating false positives and ensuring that performance comparisons are made against the correct, intended baseline.
  • Enhanced Error Messages: Improved error messages for missing baselines, providing more actionable advice including the expected filename and the exact command to establish a baseline for the specific test configuration.
  • Standardized Filename Generation: Introduced a new utility function (generateCleanFilename) to create consistent and clean filenames for baseline and test result files, improving file management and readability.
  • Compute Metric Clarity: Adjusted the output for compute performance tests to display 'throughput' (operations per second) instead of 'FPS', providing a more appropriate and accurate metric for compute workloads.
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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements improved baseline loading logic with configuration-specific validation, enhanced error messages, and naming consistency improvements. The changes focus on eliminating false positives in baseline comparisons and providing clearer debugging information.

  • Updates test preset naming from "ultra-high" to "max" for consistency and clarity
  • Implements configuration-specific baseline validation to ensure proper test-to-baseline matching
  • Enhances error messages with copy-paste ready commands for easier debugging

Reviewed Changes

Copilot reviewed 12 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates documentation to use "max" terminology instead of "ultra-high"
Metal-Performance-Tester/Managers/GraphicsTestManager.swift Moves baseline validation after configuration setup and adds config-specific checks
Metal-Performance-Tester/Managers/GraphicsBaselineManager.swift Implements configuration-specific baseline methods and clean filename generation
Metal-Performance-Tester/Managers/ComputeTestManager.swift Moves baseline validation after configuration setup and updates terminology
Metal-Performance-Tester/Managers/ComputeBaselineManager.swift Implements configuration-specific baseline methods and updates compute-specific terminology
Metal-Performance-Tester/Core/TestConfiguration.swift Removes legacy constructor and updates all preset names to use consistent naming scheme
Metal-Performance-Tester/Core/Renderer.swift Updates default configuration and method names to use "max" terminology
Metal-Performance-Tester/CLI/CommandLineParser.swift Updates command line arguments and help text to use "max" instead of "ultra-high"
Metal-Performance-Tester.xcodeproj/xcshareddata/xcschemes/*.xcscheme Updates Xcode scheme arguments to use new "max" command line options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +245 to +256
/// Generates clean filenames by extracting the key part of the test mode
/// Examples: "graphics-max" -> "max", "compute-moderate" -> "moderate"
private func generateCleanFilename(from testMode: String) -> String {
// Remove the prefix (graphics- or compute-) and return the key part
if testMode.hasPrefix("graphics-") {
return String(testMode.dropFirst("graphics-".count))
} else if testMode.hasPrefix("compute-") {
return String(testMode.dropFirst("compute-".count))
}
// Fallback: replace dashes with underscores for other formats
return testMode.replacingOccurrences(of: "-", with: "_")
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

This filename generation logic is duplicated in both GraphicsBaselineManager and ComputeBaselineManager. Consider extracting this method to a shared utility class or protocol extension to avoid code duplication.

Copilot uses AI. Check for mistakes.
Comment on lines +233 to +244
/// Generates clean filenames by extracting the key part of the test mode
/// Examples: "graphics-max" -> "max", "compute-moderate" -> "moderate"
private func generateCleanFilename(from testMode: String) -> String {
// Remove the prefix (graphics- or compute-) and return the key part
if testMode.hasPrefix("graphics-") {
return String(testMode.dropFirst("graphics-".count))
} else if testMode.hasPrefix("compute-") {
return String(testMode.dropFirst("compute-".count))
}
// Fallback: replace dashes with underscores for other formats
return testMode.replacingOccurrences(of: "-", with: "_")
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

This filename generation logic is duplicated in both GraphicsBaselineManager and ComputeBaselineManager. Consider extracting this method to a shared utility class or protocol extension to avoid code duplication.

Copilot uses AI. Check for mistakes.
@gemini-code-assist
Copy link

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@KelCodesStuff KelCodesStuff merged commit 8bcdb15 into main Sep 29, 2025
2 checks passed
@KelCodesStuff KelCodesStuff deleted the feature-1.5.0 branch September 29, 2025 19:57
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.

Incorrect Error Messages when Missing Baselines Baseline Mismatch Look into StatisticalAnalysis calculations

2 participants