File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -340,15 +340,17 @@ runs:
340340 echo $CURRENT_MESSAGE | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
341341
342342 CURRENT_JUNIT_XML_PATH=$CURRENT_PUBLIC_DIR/junit.xml
343- CURRENT_REPORT=$CURRENT_PUBLIC_DIR/report.txt
343+ CURRENT_REPORT=$CURRENT_PUBLIC_DIR/report.json
344344 set +ex
345345 (./ya make $YA_MAKE_TARGET "${params[@]}" \
346346 $RERUN_FAILED_OPT --log-file "$PUBLIC_DIR/ya_log.log" \
347347 --evlog-file "$CURRENT_PUBLIC_DIR/ya_evlog.jsonl" \
348- --junit "$CURRENT_JUNIT_XML_PATH" --build-results-report $CURRENT_REPORT --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& cat >> $YA_MAKE_OUTPUT
348+ --junit "$CURRENT_JUNIT_XML_PATH" --build-results-report " $CURRENT_REPORT" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& cat >> $YA_MAKE_OUTPUT
349349 set -ex
350350 RC=`cat exit_code`
351351
352+ .github/scripts/tests/report_analyzer.py "$CURRENT_REPORT" $CURRENT_PUBLIC_DIR/summary_report.txt || true
353+
352354 # convert to chromium trace
353355 # seems analyze-make don't have simple "output" parameter, so change cwd
354356 ya_dir=$(pwd)
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ """
4+ The tool used to analyze file created by "ya make ... --build-results-report <file>"
5+ """
6+
7+ import sys
8+ import json
9+
10+ if __name__ == "__main__" :
11+ report_path = sys .argv [1 ]
12+ summary_path = sys .argv [2 ]
13+
14+ with open ("report_path" ) as f :
15+ obj = json .loads (f .read ())
16+
17+ all = []
18+
19+ for result in obj ["results" ]:
20+ type_ = result ["type" ]
21+ if type_ == "test" and result .get ("chunk" ):
22+ rss_consumtion = result ["metrics" ].get ("suite_max_proc_tree_memory_consumption_kb" , 0 ) / 1024 / 1024
23+ path = result ["path" ] + " " + result .get ("subtest_name" , "" )
24+ all .append ((rss_consumtion , path ))
25+
26+ all .sort ()
27+ with open (summary_path , "w" ) as f :
28+ f .write ("RSS usage by tests, sorted\n \n " )
29+ for rss , path in all :
30+ f .write ("{} {%.2f} GiB \n " .format (path , rss ))
31+ f .write ("\n " )
You can’t perform that action at this time.
0 commit comments