Skip to content

Conversation

@not-napoleon
Copy link
Member

This adds the ability to capture profile information about planning. It should cover both the initial coordinator level planning and the local replanning.

@not-napoleon
Copy link
Member Author

This is extremely work in progress at the moment. It's still littered with NOCOMMITs, I haven't written any tests yet, and I haven't even started on the actual profiling. I'm just pushing it up for some early feedback on how I plumbed the profile data through the query execution.

return esqlResponse;
}

public static class Profile implements Writeable, ChunkedToXContentObject {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: I wonder if we could make this a record?
This way we could avoid custom equals/hashCode/toString.
Merge could be updated to return a new instance instead of mutating this one

* Stores profiling information about the query plan. This can be the top level planning on the coordinating node, or the local
* planning on the data nodes.
*/
public class PlannerProfile implements Writeable, ChunkedToXContentObject {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is still work in progress, but I would suggest we try to design it to be a record from the very beginning

not-napoleon and others added 6 commits March 18, 2025 13:25
 Conflicts:
	server/src/main/java/org/elasticsearch/TransportVersions.java
	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/execution/PlanExecutor.java
	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/EsqlPlugin.java
	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/TransportEsqlQueryAction.java
	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/telemetry/PlanExecutorMetricsTests.java
not-napoleon and others added 4 commits March 27, 2025 13:51
…profile' into esql-planner-profile

 Conflicts:
	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/PlannerProfile.java
@not-napoleon
Copy link
Member Author

Closing this. I'm not working on it, and am unlikely to return to it. There's enough conflicts at this point that it's probably easier to start from a clean slate if we want to pick this up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants