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

Fix profiler #482

Merged
merged 2 commits into from
Jun 24, 2016
Merged

Fix profiler #482

merged 2 commits into from
Jun 24, 2016

Conversation

blond
Copy link
Member

@blond blond commented Jun 17, 2016

No description provided.

@blond
Copy link
Member Author

blond commented Jun 17, 2016

/cc @anton-rudeshko @emelyanovtv

@@ -371,7 +371,7 @@ module.exports = inherit(/** @lends MakePlatform.prototype */ {
nodeConfig = this._projectConfig.getNodeConfig(nodePath),
node = nodeFactory.mkNode(nodePath, this, this._cache, this._graph);

node.setProfiler(this.getBuildProfiler(nodePath));
node.setProfiler(this.getNodeProfiler(nodePath));

Choose a reason for hiding this comment

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

А конкретно это изменение что делает?

Copy link
Member Author

Choose a reason for hiding this comment

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

Каждая нода ожидает такой sub-профайлер, у которого setStartTime и setEndTime принимают target и дёргают аналогичные методы у общего профайлера, подставляя текущую ноду.

enb/lib/make.js

Lines 135 to 150 in 4422818

getNodeProfiler: function (nodeName) {
var profiler = this._profiler;
return {
setStartTime: function (target) {
var filename = path.join(nodeName, target);
return profiler.setStartTime(filename);
},
setEndTime: function (target) {
var filename = path.join(nodeName, target);
return profiler.setEndTime(filename);
}
};
},

Без этого изменения не будет считаться waitTime, ну и возможны коллизии по названиям таргетов.

@anton-rudeshko
Copy link

/ok

@blond blond merged commit 4178db5 into master Jun 24, 2016
@blond blond deleted the fix-profiler branch June 24, 2016 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants