Skip to content

Commit 55e66b2

Browse files
committed
Fix missing driver description
1 parent e5a71ba commit 55e66b2

File tree

2 files changed

+5
-8
lines changed
  • x-pack/plugin/esql
    • qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node
    • tools/src/main/java/org/elasticsearch/xpack/esql/tools

2 files changed

+5
-8
lines changed

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/RestEsqlIT.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import org.elasticsearch.client.ResponseException;
1818
import org.elasticsearch.common.io.Streams;
1919
import org.elasticsearch.common.settings.Settings;
20-
import org.elasticsearch.common.xcontent.XContentHelper;
2120
import org.elasticsearch.test.ListMatcher;
2221
import org.elasticsearch.test.MapMatcher;
2322
import org.elasticsearch.test.TestClustersThreadFilter;
@@ -34,8 +33,6 @@
3433
import java.io.ByteArrayOutputStream;
3534
import java.io.IOException;
3635
import java.io.InputStream;
37-
import java.io.PipedInputStream;
38-
import java.io.PipedOutputStream;
3936
import java.nio.charset.Charset;
4037
import java.nio.charset.StandardCharsets;
4138
import java.util.ArrayList;
@@ -44,10 +41,10 @@
4441
import java.util.Locale;
4542
import java.util.Map;
4643

47-
import static org.elasticsearch.xpack.esql.tools.ProfileParser.parseProfile;
4844
import static org.elasticsearch.test.ListMatcher.matchesList;
4945
import static org.elasticsearch.test.MapMatcher.assertMap;
5046
import static org.elasticsearch.test.MapMatcher.matchesMap;
47+
import static org.elasticsearch.xpack.esql.tools.ProfileParser.parseProfile;
5148
import static org.hamcrest.Matchers.any;
5249
import static org.hamcrest.Matchers.containsInAnyOrder;
5350
import static org.hamcrest.Matchers.containsString;

x-pack/plugin/esql/tools/src/main/java/org/elasticsearch/xpack/esql/tools/ProfileParser.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ private static void emitMetadataForNode(String nodeName, int pid, XContentBuilde
123123
*/
124124
@SuppressWarnings("unchecked")
125125
private static void parseDriverProfile(Map<String, Object> driver, int pid, int tid, XContentBuilder builder) throws IOException {
126-
String taskDescription = (String) driver.get("task_description");
127-
String name = taskDescription + " " + pid + ":" + tid;
126+
String driverDescription = (String) driver.get("description");
127+
String name = driverDescription + " " + pid + ":" + tid;
128128

129-
emitMetadataForDriver(taskDescription, pid, tid, builder);
129+
emitMetadataForDriver(driverDescription, pid, tid, builder);
130130

131131
builder.startObject();
132132
// Represent a driver as a "complete" event, so that the cpu time can be represented visually.
133133
builder.field("ph", "X");
134134
builder.field("name", name);
135-
builder.field("cat", taskDescription);
135+
builder.field("cat", driverDescription);
136136
builder.field("pid", pid);
137137
builder.field("tid", tid);
138138
long startMicros = readIntOrLong(driver, "start_millis") * 1000;

0 commit comments

Comments
 (0)