-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbench.html
306 lines (290 loc) · 15.1 KB
/
bench.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<title>云服务评测</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-table.css">
<link rel="stylesheet" href="css/bootstrap-select.min.css">
<link rel="stylesheet" href="css/navbar.css">
<style>
.bootstrap-select {
margin: 10px 20px;
}
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
}
.axis text {
font-family: sans-serif;
font-size: 11px;
}
hr {
border: solid gray 0.5px;
}
</style>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-table.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/defaults-zh_CN.min.js"></script>
<script src="js/d3.v3.min.js" charset="utf-8"></script>
<script type="text/javascript">
var array = [];
$.getJSON("json/ycsb_data.json", "", function (data) {
//each循环 使用$.each方法遍历返回的数据date
array = data;
for (let item of array) {
item['instance'] = "ecs." + item['Name'].split(" ")[0];
item['workload'] = item['Name'].split(" ")[2];
item['database'] = item['Name'].split(" ")[3];
}
$(function () {
$('#table').bootstrapTable({
//请求方法
method: 'get',
//是否显示行间隔色
striped: true,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache: false,
//是否显示分页(*)
pagination: true,
//是否启用排序
sortable: true,
//排序方式
sortOrder: "asc",
//初始化加载第一页,默认第一页
//我设置了这一项,但是貌似没起作用,而且我这默认是0,- -
//pageNumber:1,
//每页的记录行数(*)
pageSize: 25,
//可供选择的每页的行数(*)
pageList: [10, 25, 50, 100],
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
data: array,
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
/* queryParams: queryParams : function(params) {
var subcompany = $('#subcompany option:selected').val();
var name = $('#name').val();
return {
pageNumber: params.offset+1,
pageSize: params.limit,
companyId:subcompany,
name:name
};
},*/
//分页方式:client客户端分页,server服务端分页(*)
sidePagination: "client",
//是否显示搜索
search: true,
//Enable the strict search.
strictSearch: true,
//Indicate which field is an identity field.
idField: "id",
columns: [
{ title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle' },
{ title: '实例规格', field: 'instance', align: 'center', valign: 'middle' },
{ title: '工作负载', field: 'workload', align: 'center', valign: 'middle' },
{ title: '数据库', field: 'database', align: 'center', valign: 'middle' },
{ title: '运行时间(ms)', field: 'Time(ms)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Cpu user time(%)', field: 'Cpu user time(%)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Cpu system time(%)', field: 'Cpu system time(%)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Cpu idle time(%)', field: 'Cpu idle time(%)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Cpu iowait time(%)', field: 'Cpu iowait time(%)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Disk used percent(%)', field: 'Disk used percent(%)', align: 'center', valign: 'middle', sortable: true },
{ title: 'Active memory', field: 'Active memory', align: 'center', valign: 'middle', sortable: true },
{ title: 'Available memory', field: 'Available memory', align: 'center', valign: 'middle', sortable: true },
{ title: 'Buffered memory', field: 'Buffered memory', align: 'center', valign: 'middle', sortable: true },
{ title: 'Cached memory', field: 'Cached memory', align: 'center', valign: 'middle', sortable: true },
{ title: 'Shared memory', field: 'Shared memory', align: 'center', valign: 'middle', sortable: true },
{ title: 'Load1', field: 'Load1', align: 'center', valign: 'middle', sortable: true },
{ title: 'Load15', field: 'Load15', align: 'center', valign: 'middle', sortable: true },
{ title: 'Load5', field: 'Load5', align: 'center', valign: 'middle', sortable: true },
{ title: 'Processed_forked', field: 'Processed_forked', align: 'center', valign: 'middle', sortable: true },
{ title: 'CInterrupts', field: 'Interrupts', align: 'center', valign: 'middle', sortable: true },
{ title: 'Total threads', field: 'Total threads', align: 'center', valign: 'middle', sortable: true },
{ title: 'Blocked threads', field: 'Blocked threads', align: 'center', valign: 'middle', sortable: true },
{ title: 'Running threads', field: 'Running threads', align: 'center', valign: 'middle', sortable: true },
{ title: 'Sleeping threads', field: 'Sleeping threads', align: 'center', valign: 'middle', sortable: true },
{ title: 'Stopped threads', field: 'Stopped threads', align: 'center', valign: 'middle', sortable: true }],
pagination: true,
toolbar: "#toolbar",
onEditableSave: function (field, row, oldValue, $el) {
$.ajax({
type: "post",
url: "/Editable/Edit",
data: { strJson: JSON.stringify(row) },
success: function (data, status) {
if (status == "success") {
alert("编辑成功");
}
},
error: function () {
alert("Error");
},
complete: function () {
}
});
},
showHeader: true,
showRefresh: true,
showFooter: false,
showToggle: true,
showColumns: true,
iconsPrefix: 'glyphicon',
icons: {
paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
refresh: 'glyphicon-refresh icon-refresh',
toggle: 'glyphicon-list-alt icon-list-alt',
columns: 'glyphicon-th icon-th',
detailOpen: 'glyphicon-plus icon-plus',
detailClose: 'glyphicon-minus icon-minus'
}
});
});
});
</script>
</head>
<body>
<!-- 导航 -->
<div class="navbar navbar-fixed-top">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Main title -->
<a class="navbar-brand" href="meter.html">云服务评分</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="active">
<a href="index.html">Home</a>
</li>
<li class="dropdown">
<a href="documents.html">文档</a>
</li>
<li>
<a href="bench.html">云服务评测</a>
</li>
<li>
<a href="ml.html">机器学习推荐</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="#">Contact</a>
</li>
<li>
<a href="#">Contributing</a>
</li>
<li>
<a href="#">Team</a>
</li>
</ul>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#">
<i class="fa fa-search"></i> Search
</a>
</li>
<li>
<a href="#">
<i class="fa fa-github"></i>
GitHub
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="jumbotron">
<div class="container">
<h1>云服务评测</h1>
<p>针对您的需求推荐最适合的云服务器。</p>
<p><a class="btn btn-primary btn-lg" role="button">
学习更多</a>
</p>
</div>
</div>
</div>
<div class="container">
<h2>Sysbench评测</h2>
<p>我们使用Sysbench对云服务器的CPU性能、内存性能、IO性能进行评测。具体情况及结果见:<a href="documents.html">文档</a></p>
<h4>Sysbench下载与安装</h4>
<div style="background-color: lightgray; height: 30px; line-height: 30px; width: 60%;">
<p style="margin-left: 30px; font-size: 15px;">以Ubuntu为例:apt-get install sysbench -y </p>
</div>
<hr />
<button class="btn btn-primary btn-lg" role="button" onclick="$('#file1').toggle()">提交你的评测结果</button>
<form class="form-horizontal" role="form" action="#" method="post" style="margin-top: 20px;" id="file1">
<div class="form-group">
<label class="col-sm-2 control-label">评测的实例:</label>
<div class="col-sm-3">
<input class="form-control" name="" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">评测结果:</label>
<div class="col-sm-3">
<input class="form-control" name="" type="file" value="">
</div>
</div>
<input class="btn btn-primary" type="submit"></input>
</form>
<script>$("#file1").hide()</script>
<h2 style="margin-top: 50px;">Netperf评测</h2>
<p>我们使用Netperf对云服务器的网络性能进行评测。具体情况及结果见:<a href="documents.html">文档</a></p>
<h4>Netperf<a href="datas/netperf-2.7.0.tar.gz" download="datas/netperf-2.7.0.tar.gz">下载</a>与安装</h4>
<div style="background-color: lightgray; height: 65px; width: 60%;">
<span style="margin-left: 30px; font-size: 15px;">解压:tar -zxvf netperf-2.7.0.tar.gz </span><br />
<span style="margin-left: 30px; font-size: 15px;">cd netperf-2.7.0</span><br />
<span style="margin-left: 30px; font-size: 15px;">安装:./configure && make && make install </span>
</div>
<hr />
<button class="btn btn-primary btn-lg" role="button" onclick="$('#file2').toggle()">提交你的评测结果</button>
<form class="form-horizontal" role="form" action="#" method="post" style="margin-top: 20px;" id="file2">
<div class="form-group">
<label class="col-sm-2 control-label">评测的实例:</label>
<div class="col-sm-3">
<input class="form-control" name="" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">评测结果:</label>
<div class="col-sm-3">
<input class="form-control" name="" type="file" value="">
</div>
</div>
<input class="btn btn-primary" type="submit"></input>
</form>
<script>$("#file2").hide()</script>
<h2 style="margin-top: 50px;">YCSB评测结果</h2>
<table id="table">
</table>
</div>
<footer style="margin-bottom: 5px;">
<hr>
<center>© Unias Team, SEI, PKU</center>
<center>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</center>
</footer>
</body>
</html>