Query Operations
by adriandarian
Run analytical queries on 3Lens data to find performance hotspots, resource leaks, shader variants, and resource usage. Use when analyzing performance issues, finding memory leaks, or understanding resource consumption.
Skill Details
Repository Files
1 file in this skill directory
name: query-operations description: Run analytical queries on 3Lens data to find performance hotspots, resource leaks, shader variants, and resource usage. Use when analyzing performance issues, finding memory leaks, or understanding resource consumption.
Query Operations
Query operations allow you to analyze captured data to find performance issues, resource leaks, and usage patterns.
When to Use
- Finding performance bottlenecks (GPU/CPU time)
- Detecting resource leaks
- Analyzing shader variant explosion
- Understanding resource usage patterns
Commands
Top Hotspots
Find the most expensive operations:
# Find top GPU time consumers over 120 frames
3lens query top_hotspots --window 120f --metric gpu_time
# Find top CPU time consumers
3lens query top_hotspots --metric cpu_time --limit 10
# Query specific context
3lens query top_hotspots --context main
Metrics: gpu_time, cpu_time, memory_delta, draw_count, triangle_count
Resource Leaks
Detect resources that aren't being disposed:
# Find resources not disposed within 300 frames
3lens query leaks --threshold 300f
# Verbose output with context
3lens query leaks --context main --verbose
Shader Variants
Analyze shader variant usage:
# List top shader variants by count
3lens query shader_variants --limit 10
# Get variants for a specific shader
3lens query shader_variants --shader <shaderId>
Resource Usage
Analyze resource consumption:
# Query texture usage
3lens query resource_usage --type texture
# Query geometry sorted by size
3lens query resource_usage --type geometry --sort size
Agent Use Cases
- Performance investigation: "Find the top 5 GPU hotspots in the last 120 frames"
- Memory debugging: "Check for resources that haven't been disposed"
- Shader optimization: "List all shader variants to identify bloat"
- Resource audit: "Show texture usage sorted by memory size"
Query Result Format
All queries return results with fidelity indicators:
{
results: [...],
fidelity: 'EXACT' | 'ESTIMATED' | 'UNAVAILABLE',
window: { start: number, end: number }
}
Additional Resources
- For detailed command syntax, see skills.md
- For attribution rules, see agents/contracts/attribution.md
- Commands: query-hotspots, query-leaks, query-shader-variants, query-resource-usage
- Contract: fidelity.md
- Agent: performance-optimizer
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Sql Optimization Patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Xlsx
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
