Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

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