Skip to content

Commit

Permalink
optimize #221
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa0128 committed Sep 19, 2023
1 parent d9964a0 commit 3c3c07d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 40 deletions.
12 changes: 8 additions & 4 deletions solox/public/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,18 @@ def instance_type(self, data):
return 'int'
else:
return 'int'

def open_file(self, path, mode):
with open(path, mode) as f:
for line in f:
yield line

def readLog(self, scene, filename):
"""Read apmlog file data"""
log_data_list = []
target_data_list = []
log_data_list = list()
target_data_list = list()
if os.path.exists(os.path.join(self.report_dir,scene,filename)):
f = open(os.path.join(self.report_dir,scene,filename), "r")
lines = f.readlines()
lines = self.open_file(os.path.join(self.report_dir,scene,filename), "r")
for line in lines:
if isinstance(line.split('=')[1].strip(), int):
log_data_list.append({
Expand Down
36 changes: 0 additions & 36 deletions solox/templates/analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'cpu',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
cpu_chart.updateSeries([{
name: 'app',
Expand All @@ -761,12 +755,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'battery',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
if(platform == 'Android'){
battery_chart.updateSeries([{
Expand Down Expand Up @@ -809,12 +797,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'fps',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
jank_chart.updateSeries([{
name: 'jank',
Expand All @@ -839,12 +821,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'gpu',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
gpu_chart.updateSeries([{
name: 'gpu',
Expand All @@ -868,12 +844,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'fps',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
fps_chart.updateSeries([{
name: 'fps',
Expand Down Expand Up @@ -937,12 +907,6 @@ <h5 class="modal-title">{% if lan == 'cn' %} 结果比对 {% else %} Compare {%
target:'flow',
platform:platform
},
beforeSend: function () {
SwalLoading('Loading','')
},
complete: function () {
swal.close();
},
success: function (data) {
network_chart.updateSeries([{
name: 'send',
Expand Down

0 comments on commit 3c3c07d

Please sign in to comment.