Add JMH benchmarks for BSLTokenizer rebuild functionality#335
Add JMH benchmarks for BSLTokenizer rebuild functionality#335
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: nixel2007 <[email protected]>
Co-authored-by: nixel2007 <[email protected]>
…marks Co-authored-by: nixel2007 <[email protected]>
|
@copilot Какие результаты тестов jmh? |
JMH тесты компилируются успешно, но запуск бенчмарков завершается с ошибкой из-за несовместимости плагина Это существующая проблема в репозитории, не связанная с моими изменениями. Для запуска JMH тестов потребуется обновить плагин до более новой версии (например, |
|
@copilot Обнови плагин jmh. Добейся запуска тестов и выведи результаты |
…execution Co-authored-by: nixel2007 <[email protected]>
Обновил плагин JMH до версии 0.7.2 и настроил параметры тестов. Результаты JMH бенчмарков (коммит 536c97c): JMXBSLTokenizerTest (новые тесты):
Общее время выполнения всех тестов: ~9.5 минут. |
Adds JMH benchmarks to measure BSLTokenizer performance for new tokenizer creation vs rebuild scenarios, including incremental text modifications.
New Benchmark:
JMXBSLTokenizerTestFive benchmark methods using
Module.bslfrom resources:newTokenizerGetTokensAndAst()- Baseline: new tokenizer + getTokens + getAstrebuildWithSameText()- Rebuild with unchanged textinsertProcedureAtBeginning()- Insert minimal procedure at startinsertProcedureAtMiddle()- Insert at middle (nearest line break)insertProcedureAtEnd()- Insert at endBenchmark Results
Total execution time: ~9.5 minutes
Fixes to existing JMH tests
IOUtils.toString()withinputStream.readAllBytes()(removes runtime dependency issue)TokenizerandParserRuleContextfrom ANTLR runtimeBSLParserRuleContext→ParserRuleContextBuild configuration
me.champeau.gradle.jmh:0.5.3tome.champeau.jmh:0.7.2(fixes Gradle 8.x compatibility)duplicatesStrategyforprocessJmhResourcestaskOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.