跳到正文
cccskills
免费在 GitHub 公开

performance-testing

Measure indicator calculation speed with BenchmarkDotNet, a benchmarking tool for .NET. Compare batch, incremental, and streaming implementations, detect slowdowns against saved results, and evaluate changes intended to reduce processing time and memory allocations.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Benchmark indicator performance with BenchmarkDotNet. Use for Series/Buffer/Stream benchmarks, regression detection, and optimization patterns. Target 1.5x Series for StreamHub, 1.2x for BufferList.

查看安装方法

适用场景

  • Comparing batch, incremental, and streaming performance
  • Detecting performance regressions after code changes
  • Adding benchmarks for a new indicator
  • Evaluating memory allocation optimizations

包含的文件(2)

  • SKILL.md3.1 KB
  • references/benchmark-patterns.md3.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Performance testing

Running benchmarks

cd tools/performance

# Run all benchmarks (~15-20 minutes)
dotnet run -c Release

# Run specific category
dotnet run -c Release --filter *StreamIndicators*
dotnet run -c Release --filter *BufferIndicators*
dotnet run -c Release --filter *SeriesIndicators*

# Run specific indicator
dotnet run -c Release --filter *.EmaHub

Adding benchmarks

Series pattern

[Benchmark]
public void ToMyIndicator() => quotes.ToMyIndicator(14);

Stream pattern

[Benchmark]
public object MyIndicatorHub() => quoteHub.ToMyIndicatorHub(14).Results;

Buffer pattern

[Benchmark]
public MyIndicatorList MyIndicatorList() => new(14) { quotes };

Style comparison

[Benchmark]
public IReadOnlyList<MyResult> MyIndicatorSeries() => quotes.ToMyIndicator(14);

[Benchmark]
public IReadOnlyList<MyResult> MyIndicatorBuffer() => quotes.ToMyIndicatorList(14);

[Benchmark]
public IReadOnlyList<MyResult> MyIndicatorStream() => quoteHub.ToMyIndicator(14).Results;

Performance targets

Note: These are optimization goals for future v3.1+ effort. Current implementations vary—see PERFORMANCE_ANALYSIS.md for actual measured performance. Some indicator families (e.g., EMA) have inherent framework overhead due to simple operation costs.

StyleTarget vs SeriesUse Case
SeriesBaselineBatch processing
BufferList≤ 1.2xIncremental data
StreamHub≤ 1.5xReal-time feeds

Expected execution times (502 periods)

Note: These are optimization targets. Actual execution times vary by indicator complexity and current implementation.

ComplexityTimeExamples
Fast< 30μsSMA, EMA, WMA, RSI
Medium30-60μsMACD, Bollinger Bands, ATR
Complex60-100μsHMA, ADX, Stochastic
Advanced100-200μs+Ichimoku, Hurst

Regression detection

# Auto-detect baseline and results
pwsh detect-regressions.ps1

# Custom threshold (default 10%)
pwsh detect-regressions.ps1 -ThresholdPercent 15

Exit codes:

  • 0 - No regressions
  • 1 - Regressions found

Creating baselines

cp BenchmarkDotNet.Artifacts/results/Performance.*-report-full.json \
   baselines/baseline-v3.0.0.json

Required optimization patterns

  • Minimize allocations in hot paths
  • Avoid LINQ in performance-critical loops
  • Use Span<T> for zero-copy operations
  • Cache calculations when possible
  • Test with realistic data sizes (502 periods)

Prohibited patterns

  • Excessive LINQ in hot paths
  • Boxing/unboxing of value types
  • Unnecessary string allocations
  • Redundant calculations in loops
  • Poor cache locality

See references/benchmark-patterns.md for detailed patterns.


Last updated: December 31, 2025

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

adaptyv

免费

Support experimental validation of designed proteins through a cloud laboratory. Prepare and optimize sequences, submit tests for binding, expression, thermal stability, or enzyme activity, track experiment progress, and retrieve results through the API.

中文简介正在准备中。当前显示英语简介。

  • Submit designed proteins for binding tests
  • Request expression, thermal stability, or enzyme activity tests
  • Optimize sequences for solubility before experiments
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

aeon

免费

Analyze time series, observations ordered over time, using aeon in Python. Build classification, prediction, and clustering workflows, detect unusual patterns or changes, and compare methods through an interface compatible with scikit-learn.

中文简介正在准备中。当前显示英语简介。

  • Classifying time series by their patterns
  • Forecasting future values from past observations
  • Detecting anomalies and change points
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

Create original generative art with p5.js, using code to produce patterns and motion. Receive a written artistic concept and an interactive HTML viewer with adjustable parameters, reproducible random variations, seed navigation, and PNG downloads.

中文简介正在准备中。当前显示英语简介。

  • Create art from particle motion and flow fields
  • Explore patterns by adjusting sliders
  • Reproduce a favorite variation with the same seed
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

Retrieve stock prices, exchange rates, cryptocurrency prices, company financial statements, and economic indicators through the Alpha Vantage API. It also covers historical data, news sentiment, and technical indicators, which summarize price and trading patterns.

中文简介正在准备中。当前显示英语简介。

  • Retrieve historical stock prices and trading volumes
  • Collect company financial statements and earnings data
  • Check foreign exchange and cryptocurrency prices
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

Design backend systems with clear boundaries between business rules, databases, and external services. Use Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to organize new applications, refactor existing code, and make core logic easier to test.

中文简介正在准备中。当前显示英语简介。

  • Planning the structure of a new backend
  • Refactoring tightly coupled applications
  • Testing business rules independently of external services
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

astropy

免费

Helps process astronomical data in Python by converting coordinates, units, and time scales, working with FITS observation files, matching object catalogs, and calculating distances using cosmological models.

中文简介正在准备中。当前显示英语简介。

  • Converting celestial coordinates
  • Reading and editing FITS observation files
  • Matching objects across astronomical catalogs
foryourhealth111-pixel/Vibe-Skills37582026年10月20日 更新

查看 foryourhealth111-pixel 的全部技能

报告此技能的问题