View | Details | Raw Unified | Return to bug 237294
Collapse All | Expand All

(-)src/org/eclipse/test/internal/performance/results/DB_Results.java (-20 / +16 lines)
Lines 696-704 Link Here
696
		int scenarioID = scenarioResults.getId();
696
		int scenarioID = scenarioResults.getId();
697
		// First try to get summaries of elapsed process dimension
697
		// First try to get summaries of elapsed process dimension
698
		result = fSQL.queryScenarioSummaries(scenarioID, config, cBuildName, bBuildName, InternalDimensions.ELAPSED_PROCESS.getId());
698
		result = fSQL.queryScenarioSummaries(scenarioID, config, cBuildName, bBuildName, InternalDimensions.ELAPSED_PROCESS.getId());
699
		boolean hasResults = false;
700
		while (result.next()) {
699
		while (result.next()) {
701
			hasResults = true;
702
			String variation = result.getString(1);
700
			String variation = result.getString(1);
703
			int summaryKind = result.getShort(2);
701
			int summaryKind = result.getShort(2);
704
			int comment_id = result.getInt(3);
702
			int comment_id = result.getInt(3);
Lines 715-738 Link Here
715
				buildResults.setSummary(summaryKind, COMMENTS[comment_id]);
713
				buildResults.setSummary(summaryKind, COMMENTS[comment_id]);
716
			}
714
			}
717
		}
715
		}
718
		if (!hasResults) {
716
		// Update scenario comment if any
719
			// Scenario is not a fingerprint, try to get comments
717
		result = fSQL.queryScenarioSummaries(scenarioID, config, cBuildName, bBuildName, 0);
720
			result = fSQL.queryScenarioSummaries(scenarioID, config, cBuildName, bBuildName, 0);
718
		while (result.next()) {
721
			while (result.next()) {
719
			String variation = result.getString(1);
722
				String variation = result.getString(1);
720
			int comment_id = result.getInt(3);
723
				int comment_id = result.getInt(3);
721
			StringTokenizer tokenizer = new StringTokenizer(variation, "=|"); //$NON-NLS-1$
724
				StringTokenizer tokenizer = new StringTokenizer(variation, "=|"); //$NON-NLS-1$
722
			tokenizer.nextToken(); 									// 'build'
725
				tokenizer.nextToken(); 									// 'build'
723
			String buildName = tokenizer.nextToken();	// 'I20070615-1200'
726
				String buildName = tokenizer.nextToken();	// 'I20070615-1200'
724
			BuildResults buildResults = null;
727
				BuildResults buildResults = null;
725
			if (buildName.equals(currentBuildName)) {
728
				if (buildName.equals(currentBuildName)) {
726
				buildResults = currentBuild;
729
					buildResults = currentBuild;
727
			} else if (buildName.equals(baselineBuildName)) {
730
				} else if (buildName.equals(baselineBuildName)) {
728
				buildResults = baselineBuild;
731
					buildResults = baselineBuild;
729
			}
732
				}
730
			if (buildResults != null) {
733
				if (buildResults != null) {
731
				buildResults.setComment(COMMENTS[comment_id]);
734
					buildResults.setComment(COMMENTS[comment_id]);
735
				}
736
			}
732
			}
737
		}
733
		}
738
	} catch (SQLException e) {
734
	} catch (SQLException e) {
(-)src/org/eclipse/test/internal/performance/results/BuildResults.java (-1 / +3 lines)
Lines 322-328 Link Here
322
 * Set the build summary and its associated comment.
322
 * Set the build summary and its associated comment.
323
 */
323
 */
324
void setComment(String comment) {
324
void setComment(String comment) {
325
	this.comment = comment;
325
	if (comment != null && this.comment == null) {
326
		this.comment = comment;
327
	}
326
}
328
}
327
329
328
/*
330
/*

Return to bug 237294