matlab/matlab-agentic-toolkit / skills-catalog/matlab-software-development/matlab-write-performance-tests
matlab-write-performance-tests
UnverifiedWrites MATLAB performance tests using the matlab.perftest.TestCase framework. Use when asked to write, create, or add performance tests for MATLAB code, benchmark functions, measure execution time with statistical rigor, or use runperf.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.4 KB |
| manifest.yaml | config | 478 B |
| references/FeaturePerformanceTest.m | other | 2.3 KB |
| references/simulink-template.md | markdown | 1.5 KB |
| references/tExampleWorkflow.m | other | 1.6 KB |
references/tExampleWorkflow.m
View on GitHubclassdef tExampleWorkflow < matlab.perftest.TestCase
%tExampleWorkflow End-to-end performance benchmark for a workflow
% Measures a single representative customer workflow with realistic
% data sizes. No parameterization — one testpoint per workflow.
%
% Run with: results = runperf('tExampleWorkflow');
% Copyright 2026 The MathWorks, Inc.
properties
inputData % Pre-loaded data for the workflow
end
methods (TestClassSetup)
function loadData(testCase)
% Load data and construct any reusable objects here.
% This runs once per test class, outside the measurement boundary.
testCase.inputData = load('workflowData.mat');
end
end
methods (TestMethodSetup)
function resetRNG(~)
% Seed RNG for deterministic results across runs.
rng(0, 'twister');
end
end
methods (Test)
function benchWorkflow(testCase)
% Extract data to local variables for clarity.
data = testCase.inputData;
testCase.startMeasuring();
% === Measured workflow ===
% Step 1: Create/configure
obj = createObject(data.input);
% Step 2: Compute
result = compute(obj, Display="off");
% Step 3: Summarize/report
output = summary(result);
testCase.stopMeasuring();
% Lightweight correctness checks (outside measurement)
testCase.verifyNotEmpty(result);
testCase.verifyNotEmpty(output);
end
end
end
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |