30.04.2019, 10:44
Как проверить скорость выполнения MySQL запросов?
Сейчас я делаю так:
![](https://cdn.discordapp.com/attachments/566032588876021771/572734435615703040/unknown.png)
Есть ещё какие то варианты?
Сейчас я делаю так:
PHP Code:
public OnRconCommand(cmd[])
{
if(!strcmp(cmd, "hello", true))
{
SendClientMessageToAll(0xFFFFFFAA, "Hello World!");
print("You said hello to the world."); // This will appear to the player who typed the rcon command in the chat in white
return 1;
} else if (!strcmp(cmd, "myspeed", true)) {
new query[128];
for(new a = 0; a < 100; a++) {
format(query, sizeof(query), "SELECT %i+1 as result", a);
mysql_tquery(g_MySQL_DB, query, "CheckMySQLSpeed", "i", gettime());
}
}
return 0;
}
forward CheckMySQLSpeed(date);
public CheckMySQLSpeed(date)
{
printf("Time MySQL --------> [Time now] %i - [Time of query] %i = %i ms", gettime(), date, gettime() - date);
return 1;
}
![](https://cdn.discordapp.com/attachments/566032588876021771/572734435615703040/unknown.png)
Есть ещё какие то варианты?