Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #9857: ReportingServiceImpl moves around a lot of data and is fairly slow #1409

Conversation

ncharles
Copy link
Member

@@ -267,6 +267,9 @@ class HomePage extends Loggable {

val globalCompliance = compliance.complianceWithoutPending.round

val n4 = System.currentTimeMillis
TimingDebugLogger.debug(s"Compute compliance for HomePage: ${n4 - n2}ms")
Copy link
Member Author

Choose a reason for hiding this comment

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

i had to move this log, as all compliance are lazy now

@ncharles
Copy link
Member Author

Commit modified

@ncharles ncharles force-pushed the bug_9857/reportingserviceimpl_moves_around_a_lot_of_data_and_is_fairly_slow branch from d48a194 to 520e532 Compare December 27, 2016 04:18
val compliance = report.compliance
val byRules: Map[RuleId, AggregatedStatusReport] = report.reports.groupBy(_.ruleId).mapValues(AggregatedStatusReport(_))
lazy val compliance = report.compliance
lazy val byRules: Map[RuleId, AggregatedStatusReport] = report.reports.groupBy(_.ruleId).mapValues(AggregatedStatusReport(_))
}

object NodeStatusReport {
def apply(nodeId: NodeId, runInfo: RunAndConfigInfo, statusInfo: RunComplianceInfo, reports: Iterable[RuleNodeStatusReport]) = {
Copy link
Member

Choose a reason for hiding this comment

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

Do we still use the old apply method ?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it is still used in ReportDisplayer

@ncharles
Copy link
Member Author

Commit modified

@ncharles ncharles force-pushed the bug_9857/reportingserviceimpl_moves_around_a_lot_of_data_and_is_fairly_slow branch from 520e532 to a0b33db Compare December 28, 2016 13:55
@@ -680,7 +680,7 @@ object ExecutionBatch extends Loggable {
}
}

NodeStatusReport(nodeId, runInfo, status, ruleNodeStatusReports)
NodeStatusReport.applyByNode(nodeId, runInfo, status, ruleNodeStatusReports)
Copy link
Member Author

Choose a reason for hiding this comment

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

i changed that, as we are sure it is from the current node

@@ -947,21 +947,17 @@ object ExecutionBatch extends Loggable {
*/
private[reports] def checkExpectedComponentWithReports(
expectedComponent: ComponentExpectedReport
, filteredReports : Seq[Reports]
, filteredReports : Seq[ResultReports]
Copy link
Member Author

Choose a reason for hiding this comment

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

by design, it is only ResultReports

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/1409
-- Your faithful QA

@ncharles ncharles force-pushed the bug_9857/reportingserviceimpl_moves_around_a_lot_of_data_and_is_fairly_slow branch from a0b33db to 833beda Compare December 29, 2016 15:22
@ncharles
Copy link
Member Author

PR rebased

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/1409
-- Your faithful QA

@ncharles
Copy link
Member Author

OK, merging this PR

@ncharles ncharles merged commit 833beda into Normation:branches/rudder/4.0 Dec 29, 2016
*/
def filterByRules(nodeStatusReport: NodeStatusReport, ruleIds: Set[RuleId]) : NodeStatusReport = {
new NodeStatusReport(
nodeStatusReport.forNode
Copy link
Member Author

Choose a reason for hiding this comment

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

what is this forNode ?

Copy link
Member Author

Choose a reason for hiding this comment

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

ha, this is up there

Copy link
Member Author

Choose a reason for hiding this comment

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

in 4.1 this is nodeId ...

@ncharles
Copy link
Member Author

OK, merging this PR

This pull request was closed.
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