Loading
Scalability
ApexGuru FAQ

ApexGuru FAQ

Get answers to common questions about ApexGuru.

What is ApexGuru?

ApexGuru is an AI-powered tool that analyzes your Apex code to find and fix performance-related issues. ApexGuru provides insights within 24 hours of opt-in and refreshes weekly. Retrieve insights for the last 30 days.

How does ApexGuru analyze my code?

ApexGuru requires read-only access to your Apex code. It makes an encrypted copy for analysis and then immediately deletes it. It doesn't store your code long-term.

Are there any usage limits for ApexGuru?

Insight generation is limited to 3 per rolling week. If you're using the ApexGuru integration with Code Analyzer, you're limited to 50 scans per org per hour.

What does ApexGuru evaluate my code for?

ApexGuru checks for various governor limits, including CPU time, SOQL queries and statement length, DML statements, and the total Apex character limit. It also identifies antipatterns like SOQL and DML statements within loops.

Where can I use ApexGuru?

ApexGuru requires activation in a Production or Full Copy Sandbox org on Unlimited, Enterprise, Professional, or Signature Edition. Activation gives you runtime-informed insights based on your org's live usage data.

After activation, ApexGuru Insights are also available via Code Analyzer in Developer Sandbox, Partial Copy Sandbox, and Scratch Orgs where the Developer Hub is a Production or Full Copy org. Code Analyzer delivers these insights in your IDE, the CLI, CI/CD pipelines, and Skills.

Without activation, Code Analyzer still provides static antipattern detection across all its surfaces. Runtime data isn't included, but you can start identifying and fixing code quality issues immediately.

How do I use ApexGuru with Salesforce Code Analyzer?

ApexGuru's automated code optimization features are directly integrated into Code Analyzer. To learn more, see ApexGuru Engine and Scan Your Apex Code for Performance Issues Using ApexGuru.

Is ApexGuru available in Hyperforce?

Yes, ApexGuru is available in Hyperforce. If it was enabled before migration, it remains active afterward.

Does enabling ApexGuru affect my org's performance?

No, ApexGuru uses logs that are collected without any impact on your org's performance. It also doesn't count towards platform limits.

Why is a DML operation flagged as an expensive method?

DML operations typically impact database limits, but they can appear as CPU "hot spots" due to execution grouping. This occurs when the analysis engine aggregates processing time from related sources into the DML entry point. The time includes pre-DML logic like intensive data transformations or list sorting performed before the operation. Downstream CPU demands result from before-save triggers, validation rules, and flows started by the operation.

How do I investigate flagged DML statements?

  • Review the code leading up to the DML call. The bottleneck is often in the data preparation phase.
  • Check for heavy logic in triggers or automation associated with the sObject.

How should I configure my network security for ApexGuru?

To ensure uninterrupted connectivity, we recommend that you use domain-based allowlisting (for example, salesforce.com) instead of IP-based restrictions. This approach is more reliable for cloud apps. In most configurations, ApexGuru traffic appears as standard Salesforce traffic. Make sure that your network allows traffic from the standard Salesforce IP ranges.

Can I allowlist specific IP addresses?

No, ApexGuru doesn't support strict IP allowlisting for individual app instances. Because our cloud infrastructure is dynamic, it assigns and rotates addresses without notice. Even providing static ranges can create a false sense of security and lead to service interruptions. If you hard code dynamic IP addresses into a firewall, connectivity will break whenever the infrastructure automatically scales or updates.

What is the Test Case Insights feature?

Test Case Insights analyzes your codebase to identify gaps in test coverage, detect test antipatterns, and provide AI-generated recommendations to strengthen your Apex test suite.

How does Test Case Insights work?

Test Case Insights evaluates your Apex methods and generates recommendations to improve them. Instead of using severity levels, it categorizes methods based on test quality:

  • Untested: No test coverage. This category has the highest priority.
  • Unasserted: Tests execute code but don't validate outcomes.
  • Undertested: Limited test data or missing boundary and edge cases.

To help you focus on the most critical gaps, Test Case Insights surfaces only prioritized categories.

How does prioritization work?

To help you address the most critical issues first, Test Case Insights surfaces up to 50 high-impact methods per analysis:

  • Untested methods: Highest risk with no validation coverage.
  • Expensive methods: High runtime impact areas such as hot methods.
  • Methods with detected antipatterns: Issues such as unasserted and undertested scenarios.

What does Code Duplicates do?

Code Duplicates identifies exact and near-duplicate Apex code across your org's custom code (managed packages excluded). It displays the top 100 duplicate groups ranked by characters reducible—the number of characters you can consolidate. An Exact duplicate is identical after normalization; a Near Duplicate has minor differences like renamed variables.

How are characters reducible calculated?

The calculation is the size of one copy times (number of copies − 1). For example, 3 copies of a 5,000-character method = 5,000 × (3 − 1) = 10,000 characters reducible.

Does Code Duplicates impact my org?

No. Code Duplicates uses static analysis with no impact on org performance, storage limits, or API usage.

 
正在載入
Salesforce Help | Article