mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
commit
04b825a429
@ -207,31 +207,28 @@ def append_row_data(report_file, case_test_data):
|
||||
ark_divide_v_8_with_jitless = str("{:.2f}".format(float(exec_time) / float(v_8_jitless_excute_time)))
|
||||
jis_case_file_name_with_class = Constants.JS_FILE_SUPER_LINK_DICT['/'.join([class_name, api_name])]
|
||||
js_file_super_link = '/'.join([Constants.HYPERLINK_HEAD, jis_case_file_name_with_class])
|
||||
new_row = [js_case_name, scene, excute_status,
|
||||
cast_to_float_or_str(exec_time), yesterday_excute_time,
|
||||
is_degraded_str,
|
||||
cast_to_float_or_str(v_8_excute_time),
|
||||
cast_to_float_or_str(v_8_jitless_excute_time),
|
||||
cast_to_float_or_str(ark_divide_v_8),
|
||||
cast_to_float_or_str(ark_divide_v_8_with_jitless),
|
||||
js_file_super_link, ' ']
|
||||
new_row = [js_case_name, scene, excute_status, cast_to_float_or_str(exec_time), yesterday_excute_time,
|
||||
is_degraded_str,cast_to_float_or_str(v_8_excute_time),
|
||||
cast_to_float_or_str(v_8_jitless_excute_time),cast_to_float_or_str(ark_divide_v_8),
|
||||
cast_to_float_or_str(ark_divide_v_8_with_jitless),js_file_super_link, ' ']
|
||||
ws.append(new_row)
|
||||
if is_degraded_str is str(True):
|
||||
ws.cell(row=ws.max_row, column=6).fill = PatternFill(start_color='FF0000', end_color='FF0000',
|
||||
fill_type=Constants.SOLID)
|
||||
if (ark_divide_v_8 != Constants.NA_FIX and
|
||||
(float(ark_divide_v_8) > 2 or
|
||||
abs(float(ark_divide_v_8) - 2) <= Constants.COMPARISON_ACCURACY)):
|
||||
ws.cell(row=ws.max_row, column=9).fill = PatternFill(start_color='FFFF00', end_color='FFFF00',
|
||||
fill_type=Constants.SOLID)
|
||||
if (ark_divide_v_8_with_jitless != Constants.NA_FIX and
|
||||
(float(ark_divide_v_8_with_jitless) > 2 or
|
||||
abs(float(ark_divide_v_8_with_jitless) - 2) <= Constants.COMPARISON_ACCURACY)):
|
||||
ws.cell(row=ws.max_row, column=10).fill = PatternFill(start_color='FF00FF', end_color='FF00FF',
|
||||
fill_type=Constants.SOLID)
|
||||
check(is_degraded_str, ark_divide_v_8, ark_divide_v_8_with_jitless, ws)
|
||||
wb.save(report_file)
|
||||
return Constants.RET_OK
|
||||
|
||||
def check(is_degraded_str,ark_divide_v_8,ark_divide_v_8_with_jitless,ws):
|
||||
if is_degraded_str is str(True):
|
||||
ws.cell(row=ws.max_row, column=6).fill = PatternFill(start_color='FF0000', end_color='FF0000',
|
||||
fill_type=Constants.SOLID)
|
||||
if (ark_divide_v_8 != Constants.NA_FIX and
|
||||
(float(ark_divide_v_8) > 2 or abs(float(ark_divide_v_8) - 2) <= Constants.COMPARISON_ACCURACY)):
|
||||
ws.cell(row=ws.max_row, column=9).fill = PatternFill(start_color='FFFF00', end_color='FFFF00',
|
||||
fill_type=Constants.SOLID)
|
||||
if (ark_divide_v_8_with_jitless != Constants.NA_FIX and
|
||||
(float(ark_divide_v_8_with_jitless) > 2 or
|
||||
abs(float(ark_divide_v_8_with_jitless) - 2) <= Constants.COMPARISON_ACCURACY)):
|
||||
ws.cell(row=ws.max_row, column=10).fill = PatternFill(start_color='FF00FF', end_color='FF00FF',
|
||||
fill_type=Constants.SOLID)
|
||||
|
||||
def get_ark_js_cmd(abc_file: str) -> List[str]:
|
||||
"""Get command for ark js vm"""
|
||||
|
@ -133,6 +133,15 @@ class IrToPicture {
|
||||
|
||||
let lines = [];
|
||||
let lid = 0;
|
||||
this.generateLine(nodes)
|
||||
this.resetPicture(nodes, isBlock);
|
||||
|
||||
return {
|
||||
nodes: nodes,
|
||||
lines: lines,
|
||||
};
|
||||
}
|
||||
static generateLine(nodes,lines,lid){
|
||||
for (let i in nodes) { //生成连接线
|
||||
let inId = parseInt(i);
|
||||
for (let inP1 = 0; inP1 < nodes[inId].ir.in.length; inP1++) {
|
||||
@ -160,14 +169,8 @@ class IrToPicture {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.resetPicture(nodes, isBlock);
|
||||
|
||||
return {
|
||||
nodes: nodes,
|
||||
lines: lines,
|
||||
};
|
||||
}
|
||||
|
||||
static deepTest(n, nodes, isBlock, stack, dist) {
|
||||
try {
|
||||
stack.push(n.ir.id);
|
||||
|
@ -693,22 +693,8 @@ class IrViewer {
|
||||
this.offy_ = (-this.scrollY_.getBarOff()) * this.dragScoll.hh - this.dragScoll.y1;
|
||||
this.offx_ = (-this.scrollX_.getBarOff()) * this.dragScoll.ww - this.dragScoll.x1;
|
||||
}
|
||||
onTouch(msg, x, y) {
|
||||
if (this.loading()) {
|
||||
return true;
|
||||
}
|
||||
if (this.smallMapLocked_) {
|
||||
if (msg === 2) {
|
||||
this.resetOffset(x, y);
|
||||
}
|
||||
if (msg === 3) {
|
||||
this.smallMapLocked_ = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (msg === 6) {
|
||||
this.drapBackground_ = null;
|
||||
}
|
||||
|
||||
checkMsgAndDrapSelect_(msg, x, y){
|
||||
if (msg === 3 && this.drapSelect_) {
|
||||
let nodes = this.visable_.nodes;
|
||||
for (let k of this.selectPoint_) {
|
||||
@ -717,6 +703,9 @@ class IrViewer {
|
||||
}
|
||||
this.drapSelect_ = null;
|
||||
}
|
||||
}
|
||||
|
||||
checkDrapBackground_(msg, x, y){
|
||||
if (this.drapBackground_) {
|
||||
if (msg === 2) {
|
||||
this.offx_ -= this.drapBackground_.x - x;
|
||||
@ -726,6 +715,9 @@ class IrViewer {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
checkDrapSelect_(msg, x, y){
|
||||
if (this.drapSelect_) {
|
||||
if (msg === 2) {
|
||||
if (Math.abs(this.drapSelect_.x - x) > 10 ||
|
||||
@ -740,19 +732,9 @@ class IrViewer {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (this.scrollX_.onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
if (this.scrollY_.onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
if (XTools.InRect(x, y, ...this.smallMapRect)) {
|
||||
if (msg === 1) {
|
||||
this.resetOffset(x, y);
|
||||
this.smallMapLocked_ = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
checkSearchInput(msg, x, y){
|
||||
if (this.searchInput) {
|
||||
if (XTools.InRect(x, y, ...this.searchInput.pos)) {
|
||||
if (this.searchInput.btnUp.onTouch(msg, x, y)) {
|
||||
@ -778,11 +760,9 @@ class IrViewer {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (let i = this.btnGo_.length - 1; i >= 0; i--) {
|
||||
if (this.btnGo_[i].onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkMsg(msg, x, y){
|
||||
if (msg === 1) {
|
||||
let nodes = this.visable_.nodes;
|
||||
for (let k in nodes) {
|
||||
@ -810,7 +790,47 @@ class IrViewer {
|
||||
}
|
||||
this.selectPoint_ = [];
|
||||
}
|
||||
}
|
||||
|
||||
onTouch(msg, x, y) {
|
||||
if (this.loading()) {
|
||||
return true;
|
||||
}
|
||||
if (this.smallMapLocked_) {
|
||||
if (msg === 2) {
|
||||
this.resetOffset(x, y);
|
||||
}
|
||||
if (msg === 3) {
|
||||
this.smallMapLocked_ = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (msg === 6) {
|
||||
this.drapBackground_ = null;
|
||||
}
|
||||
this.checkMsgAndDrapSelect_(msg, x, y)
|
||||
this.checkDrapBackground_(msg, x, y)
|
||||
this.checkDrapSelect_(msg, x, y)
|
||||
if (this.scrollX_.onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
if (this.scrollY_.onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
if (XTools.InRect(x, y, ...this.smallMapRect)) {
|
||||
if (msg === 1) {
|
||||
this.resetOffset(x, y);
|
||||
this.smallMapLocked_ = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
this.checkSearchInput(msg, x, y)
|
||||
for (let i = this.btnGo_.length - 1; i >= 0; i--) {
|
||||
if (this.btnGo_[i].onTouch(msg, x, y)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this.checkMsg(msg, x, y)
|
||||
if (msg === 4) {
|
||||
this.drapBackground_ = {
|
||||
x: x,
|
||||
|
Loading…
Reference in New Issue
Block a user