feat(recorder): Add time on queries column in request list
This commit is contained in:
parent
0bf2d3f830
commit
cdde489d7b
2 changed files with 4 additions and 3 deletions
|
|
@ -16,9 +16,9 @@
|
|||
<th style="width:22%"><span style="margin-right:5px">Time</span><i @click="sort('time')" class="glyphicon" :class="glyphicon('time')"></i></th>
|
||||
<th style="width:9%"><span style="margin-right:5px">Duration</span><i @click="sort('duration')" class="glyphicon" :class="glyphicon('duration')"></i></th>
|
||||
<th style="width:9%"><span style="margin-right:5px">Queries</span><i @click="sort('queries')" class="glyphicon" :class="glyphicon('queries')"></i></th>
|
||||
<th style="width:9%"><span style="margin-right:5px">Query Duration</span><i @click="sort('time_queries')" class="glyphicon" :class="glyphicon('time_queries')"></i></th>
|
||||
<th style="width:7%"><span>Method</span></th>
|
||||
<th style="width:24%"><span style="margin-right:5px">Path</span><i @click="sort('path')" class="glyphicon" :class="glyphicon('path')"></i></th>
|
||||
<th style="width:24%"><span style="margin-right:5px">CMD</span><i @click="sort('cmd')" class="glyphicon" :class="glyphicon('cmd')"></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -27,18 +27,18 @@
|
|||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><input style="width:100%" v-model="query.filters.method"/></td>
|
||||
<td><input style="width:100%" v-model="query.filters.path"/></td>
|
||||
<td><input style="width:100%" v-model="query.filters.cmd"/></td>
|
||||
</tr>
|
||||
<router-link style="cursor: pointer" :to="{name: 'request-detail', params: {request_uuid: request.uuid}}" tag="tr" v-for="request in paginated(sorted(filtered(requests)))" :key="request.index" v-bind="request">
|
||||
<td>{{ request.index }}</td>
|
||||
<td>{{ request.time }}</td>
|
||||
<td>{{ request.duration }}</td>
|
||||
<td>{{ request.queries }}</td>
|
||||
<td>{{ request.time_queries }}</td>
|
||||
<td>{{ request.method }}</td>
|
||||
<td>{{ request.path | elipsize }}</td>
|
||||
<td>{{ request.cmd | elipsize }}</td>
|
||||
</router-link>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ class Recorder():
|
|||
"cmd": self.cmd,
|
||||
"time": self.time,
|
||||
"queries": len(self.calls),
|
||||
"time_queries": float("{:0.3f}".format(sum(call["duration"] for call in self.calls))),
|
||||
"duration": float("{:0.3f}".format((datetime.datetime.now() - self.time).total_seconds() * 1000)),
|
||||
"method": self.method,
|
||||
}, default=str)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue