Profectus-Demo/src/components/system/TPS.vue

29 lines
475 B
Vue
Raw Normal View History

<template>
<div class="tpsDisplay">
TPS: {{ tps }}
</div>
</template>
<script>
2021-05-25 20:57:02 -05:00
import Decimal, { format } from '../../util/bignum';
export default {
name: 'TPS',
computed: {
tps() {
const lastTenTicks = this.$store.state.lastTenTicks;
return format(Decimal.div(lastTenTicks.length, lastTenTicks.reduce((acc, curr) => acc + curr, 0)))
}
}
};
</script>
<style scoped>
.tpsDisplay {
position: absolute;
left: 10px;
bottom: 10px;
2021-05-22 15:29:06 -05:00
z-index: 100;
}
</style>