Skip to content

feat: Добавление указание наименования бенчмарка#44

Merged
Stivo182 merged 3 commits intomainfrom
feat/benchmark-title
Mar 21, 2026
Merged

feat: Добавление указание наименования бенчмарка#44
Stivo182 merged 3 commits intomainfrom
feat/benchmark-title

Conversation

@Stivo182
Copy link
Owner

@Stivo182 Stivo182 commented Mar 21, 2026

  • Добавлен параметр Наименование в аннотацию &Бенчмарк
  • Добавлен API дескриптора Наименование()/УстановитьНаименование()

Summary by CodeRabbit

  • New Features

    • Benchmarks can include optional custom names that appear in reports.
  • Bug Fixes / Improvements

    • Benchmark configuration tuned (more iterations, per-iteration hook) and minor formatting fixes (trailing newlines).
  • Documentation / Samples

    • Example benchmark reports updated with shorter labels, explicit complexity annotations and refreshed measurements.
  • Tests

    • Added tests for name extraction, descriptor copying with names, and inclusion of names in generated reports.

- Добавлен параметр Наименование в аннотацию &Бенчмарк
- Добавлен API дескриптора Наименование()/УстановитьНаименование()
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 252a44dc-8880-4d4e-ae9c-48e020899b09

📥 Commits

Reviewing files that changed from the base of the PR and between 76e86a8 and 372f961.

📒 Files selected for processing (2)
  • src/BenchmarkOneScript/core/Классы/ДескрипторБенчмарка.os
  • tests/fixtures/verified-report.json
✅ Files skipped from review due to trivial changes (1)
  • src/BenchmarkOneScript/core/Классы/ДескрипторБенчмарка.os
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/fixtures/verified-report.json

📝 Walkthrough

Walkthrough

Adds an optional Наименование annotation parameter and threads it into descriptor creation, storage (serialized field), accessor/mutator, reporting (label preference), tests, fixtures, and sample adjustments; includes minor formatting/newline fixes.

Changes

Cohort / File(s) Summary
Annotation & Descriptor
src/BenchmarkOneScript/core/Классы/АннотацияБенчмарк.os, src/BenchmarkOneScript/core/Классы/ДескрипторБенчмарка.os
Annotation procedure signature now accepts ПриСозданииОбъекта(Наименование = ""). Descriptor gains serialized _Наименование, exported Наименование() and УстановитьНаименование(Наименование), and Скопировать() propagates the name.
Descriptor Extraction
src/BenchmarkOneScript/core/Классы/ИзвлекательДескрипторовБенчмарков.os
Added ПрочитатьНаименованиеИзАннотацииБенчмарк(СвойстваМетода, ДескрипторБенчмарка) and call from СоздатьДескриптор to read/apply Наименование from &Бенчмарк when present.
Reporting
src/BenchmarkOneScript/core/Модули/КолонкаОтчетаБенчмарковМетод.os
Значение(...) now prefers Дескриптор.Наименование() when non-empty, falling back to Метод().
Samples & Examples
samples/benchmarks/examples/БенчмаркСортировок.os, samples/benchmarks/examples/БенчмаркСортировок.md
Benchmark declarations updated to pass explicit Наименование strings (algorithm + complexity); sample markdown tables/labels and some comments adjusted; event hook changed from &ПослеКаждогоКейса to &ПослеИтерации.
Tests & Fixtures
tests/fixtures/benchmarks/Классы/БенчмаркСНаименованием.os, tests/ТестыБенчмарков.os, tests/fixtures/verified-report.json
Added fixture with annotated benchmarks (with and without Наименование). Tests added/extended to validate extraction, mutator, cloning propagation, and report inclusion. verified-report.json entries gain "Title": "".
Formatting / Newlines
multiple files (various above)
Ensured trailing newlines at EOF and minor whitespace/comment cleanup across changed files.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Source as Source<br/>Code (&Бенчмарк)
    participant Extractor as Descriptor<br/>Extractor
    participant Descriptor as Descriptor<br/>Object
    participant Reporter as Report<br/>Column

    Dev->>Source: Declare &Бенчмарк(Наименование="...")
    Source->>Extractor: Annotation read via РаботаСАннотациями
    Extractor->>Extractor: ПрочитатьНаименованиеИзАннотацииБенчмарк(...)
    alt Наименование не пусто
        Extractor->>Descriptor: УстановитьНаименование(Наименование)
        Descriptor->>Descriptor: Сохранить _Наименование
    end
    Reporter->>Descriptor: Запрос Наименование() или Метод()
    alt Наименование заполнено
        Descriptor-->>Reporter: Return Наименование
    else
        Descriptor-->>Reporter: Return Метод
    end
    Reporter->>Dev: Отобразить строку с выбранной меткой
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐇 Я имя в аннотации прячу, тихо шепчу,
В дескриптор перепрыгну — и в отчёт попаду.
Таблица сияет, строки в ряд,
Теперь у бенчмарка есть свой взгляд! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding the ability to specify benchmark names through a new 'Наименование' parameter in the &Бенчмарк annotation and descriptor API methods.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/benchmark-title

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonar-openbsl-ru-qa-bot
Copy link

@Stivo182 Stivo182 merged commit 45c99fc into main Mar 21, 2026
32 checks passed
@Stivo182 Stivo182 deleted the feat/benchmark-title branch March 21, 2026 22:44
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.

1 participant