Skip to content

Commit 26478a3

Browse files
committed
also fix conflicts between components
Signed-off-by: see-quick <maros.orsak159@gmail.com>
1 parent 74fa9ac commit 26478a3

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

systemtest/src/main/java/io/strimzi/systemtest/performance/report/parser/BasePerformanceMetricsParser.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,24 @@ protected boolean isRunningInTest() {
104104
}
105105

106106
/**
107-
* Parses the latest metrics from the structured directory, assuming that each parser knows
108-
* which components to parse.
107+
* Parses the latest metrics from the structured directory for a specific component.
109108
*
110-
* @throws IOException If an I/O error occurs while accessing the filesystem.
109+
* @param componentDirName The name of the component directory to parse (e.g., "topic-operator", "user-operator").
110+
* @throws IOException If an I/O error occurs while accessing the filesystem.
111111
*/
112-
protected void parseLatestMetrics() throws IOException {
112+
protected void parseLatestMetrics(String componentDirName) throws IOException {
113113
final Path basePath = findLatestDirectory();
114114
if (basePath == null) {
115115
LOGGER.error("No directories found in the specified path.");
116116
return;
117117
}
118118

119-
// Assuming each parser knows which components to parse.
120119
final File[] componentDirs = basePath.toFile().listFiles(File::isDirectory);
121120
if (componentDirs != null) {
122121
for (File componentDir : componentDirs) {
123-
parseComponentMetrics(componentDir);
122+
if (componentDir.getName().equals(componentDirName)) {
123+
parseComponentMetrics(componentDir);
124+
}
124125
}
125126
}
126127
}

systemtest/src/main/java/io/strimzi/systemtest/performance/report/parser/TopicOperatorMetricsParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected String[] getHeadersForUseCase(ExperimentMetrics experimentMetrics) {
144144

145145
@Override
146146
public void parseMetrics() throws IOException {
147-
this.parseLatestMetrics();
147+
this.parseLatestMetrics(PerformanceConstants.TOPIC_OPERATOR_PARSER);
148148
}
149149

150150
@Override

systemtest/src/main/java/io/strimzi/systemtest/performance/report/parser/UserOperatorMetricsParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected String[] getHeadersForUseCase(ExperimentMetrics experimentMetrics) {
136136

137137
@Override
138138
public void parseMetrics() throws IOException {
139-
this.parseLatestMetrics();
139+
this.parseLatestMetrics(PerformanceConstants.USER_OPERATOR_PARSER);
140140
}
141141

142142
@Override

0 commit comments

Comments
 (0)