Skip to content

Speedup individual CsvIt spec execution#145869

Merged
idegtiarenko merged 4 commits intoelastic:mainfrom
idegtiarenko:speedup_CsvIT
Apr 9, 2026
Merged

Speedup individual CsvIt spec execution#145869
idegtiarenko merged 4 commits intoelastic:mainfrom
idegtiarenko:speedup_CsvIT

Conversation

@idegtiarenko
Copy link
Copy Markdown
Contributor

This implements couple of distinct changes that could speedup test initialization in CsvIt

@idegtiarenko idegtiarenko requested a review from jan-elastic April 8, 2026 08:09
@idegtiarenko idegtiarenko added >test Issues or PRs that are addressing/adding tests Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.4.0 labels Apr 8, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

nodeConfigDir = createConfigDir();
long start = System.currentTimeMillis();
logger.info("Creating test cluster");
var nodeDirectory = createTempDir();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createTempDir() proved to be expensive in #145543
This reuses single temp dir rather than having a separate one for configuration.

new PlannerSettings.Holder(clusterService),
CrossProjectModeDecider.NOOP
);
}
Copy link
Copy Markdown
Contributor Author

@idegtiarenko idegtiarenko Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CsvIT uses EsqlTestUtils#classpathResources in order to discover and load spec files.
Since EsqlTestUtils has to be laoded above static block was executed as well, initializing number of non trivial but unused dependencies adding ~1s (highlighted in the profile below) to initialization duration on my machine. Moving this code to its only usage.

Image

Copy link
Copy Markdown
Contributor

@jan-elastic jan-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@idegtiarenko idegtiarenko merged commit 8f3734c into elastic:main Apr 9, 2026
36 checks passed
@idegtiarenko idegtiarenko deleted the speedup_CsvIT branch April 9, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants