Vue.component('system', { props: ['tick', 'system', 'system_time'], methods: { entity_count() { return this.system.current.matched_entity_count; }, table_count() { return this.system.current.matched_table_count; }, fragmentation() { return (((this.table_count() - 1) / this.entity_count()) * 100).toFixed(1) + "%"; }, percentage() { return (this.system.current.time_spent / this.system_time) * 100; }, percentage_class() { let pct = this.percentage(); if (pct < 1.0) { return "system-lowest"; } else if (pct < 5.0) { return "system-low"; } else if (pct < 10.0) { return "system-medium"; } else if (pct < 20.0) { return "system-high"; } else { return "system-highest"; } } }, template: `