mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 22:22:50 +00:00
feat(nui): Display the amount of slow queries
This commit is contained in:
1 parent
18eb6d1f29
commit
553775c9a0
5 files changed
+10
-2
No files matched your search
@@ -15,6 +15,7 @@ debugData([
|
||||
resources: ['ox_inventory', 'luke_garages', 'es_extended'],
|
||||
totalQueries: 732,
|
||||
totalTime: 258,
|
||||
slowQueries: 6,
|
||||
chartData: [
|
||||
{ x: 13, y: 350, z: 'ox_inventory' },
|
||||
{ x: 27, y: 752, z: 'es_extended' },
|
||||
|
||||
@@ -9,6 +9,7 @@ const LeftBar: React.FC = () => {
|
||||
resources: [''],
|
||||
totalQueries: 0,
|
||||
totalTime: 0,
|
||||
slowQueries: 0,
|
||||
chartData: [{ x: 0, y: 0, z: '' }],
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ const RightBar: React.FC = () => {
|
||||
const [initData, setInitData] = useState<InitData>({
|
||||
totalQueries: 0,
|
||||
totalTime: 0,
|
||||
slowQueries: 0,
|
||||
resources: [''],
|
||||
chartData: [{ x: 0, y: 0, z: '' }],
|
||||
});
|
||||
@@ -24,8 +25,9 @@ const RightBar: React.FC = () => {
|
||||
<Flex direction="column" h="100%">
|
||||
<Box>
|
||||
<VStack align="left">
|
||||
<Box>Number of queries: {initData.totalQueries}</Box>
|
||||
<Box>Time querying: {Math.trunc(initData.totalTime)} ms</Box>
|
||||
<Text>Number of queries: {initData.totalQueries}</Text>
|
||||
<Text>Time querying: {Math.trunc(initData.totalTime)} ms</Text>
|
||||
<Text color="#f3eca1">Slow queries: {initData.slowQueries}</Text>
|
||||
</VStack>
|
||||
</Box>
|
||||
<Spacer />
|
||||
|
||||
@@ -8,5 +8,6 @@ export type InitData = {
|
||||
resources: string[];
|
||||
totalQueries: number;
|
||||
totalTime: number;
|
||||
slowQueries: number;
|
||||
chartData: ChartData[];
|
||||
};
|
||||
Reference in new issue
Block a user