-
Couldn't load subscription status.
- Fork 54
Metrics for profiler #490
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
Metrics for profiler #490
Conversation
0b643d0 to
b27782f
Compare
|
@blond review plz |
b27782f to
c43d735
Compare
|
Разве это не должно называться html rerport for profiler? |
|
почему ? там html даже и не пахнет =) |
|
Ой, да, в смысле, console reporter :) |
lib/build-profiler.js
Outdated
| if (a > b) return 1; | ||
| if (a < b) return -1; | ||
|
|
||
| return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Просто { return a - b; }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
5371d06 to
2a28b4a
Compare
lib/ui/print-profiler.js
Outdated
|
|
||
| module.exports = function (printData) { | ||
| var printTable = new Table({ | ||
| head: ['Tech Name', 'Number of calls', 'Time spend (%)', 'Percentile 95'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Percentile 95
ms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
→ ['Tech', '×', 'Elapsed', 'P95'] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И легенду снизу, если нужно, что есть что
|
Тут ещё появилось предложение Если Если По умолчанию |
lib/cli/make.js
Outdated
|
|
||
| make(args, cmd) | ||
| .then(function (data) { | ||
| if (cmd.profiler) return printProfiler(data.metricsInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why return?
555079d to
40f5aca
Compare
ec37e94 to
969fbc6
Compare
|
/ping |
lib/ui/print-profiler.js
Outdated
| var Table = require('cli-table'); | ||
|
|
||
| module.exports = { | ||
| showForTechs: function (printData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printTechTable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
блин, как-то странно, мне просто сочетание не нравится. Сейчас так printProfiler.showForTechs
, а будет printProfiler. printTechTable . print*.print смущает (
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можешь назвать profilerUI ;)
|
Ещё бы конечно тестов для вычислений, но да ладно. |
a672b50 to
7e50d98
Compare
|
/ping |
|
Я тут собрал
Время ожидания |
| @@ -0,0 +1,38 @@ | |||
| var _ = require('lodash'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно прям файл переименовать в profiler-ur.
|
на счёт project-stub, может кеш? я такого не встречал =( |
lib/ui/print-profiler.js
Outdated
| _.map(printData, function (targetInfo) { | ||
| printTable.push([ | ||
| targetInfo.target, | ||
| targetInfo.selfTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сейчас из вывода не понятно что это ms. Давай сделаем человекопонятно:
const prettyMs = require('pretty-ms');
prettyMs(targetInfo.selfTime);
prettyMs(targetInfo.watingTime);
prettyMs(targetInfo.totalTime);7e50d98 to
337e4b8
Compare
Кейс такой: зависимость у таргета есть, но она отрабатывает раньше, чем технология сборка текущего таргета начинается. Где-то после надо добавить условие if (depEndTime < targetStartTime) {
selfTime = targetEndTime - targetStartTime;
} |
f2a7ccf to
6428caa
Compare
package.json
Outdated
| "inherit": "2.2.4", | ||
| "lodash": "4.13.1", | ||
| "percentile": "1.1.0", | ||
| "pretty-ms": "^2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
точная зависимость
6428caa to
7dff206
Compare
|
/done |
lib/build-profiler.js
Outdated
| buildTimePercent: _this.getBuildTimePercent(metrics.buildTime, totalTime) | ||
| }; | ||
| }, | ||
| 'buildTimePercent' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И ещё лучше сортировать по времени, а не по проценту. Тогда с разным временем, но одинаковым процентом будут правильно отсортированы.
Т.е. по metrics.buildTime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а какая разница ?=)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы проценты округляем, в секундах они могут отличаться.
7dff206 to
bcac53f
Compare
No description provided.