mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-15273 basic read/write perf counter in moodle_database
This commit is contained in:
parent
e79fe53d98
commit
edef70c9d0
1 changed files with 16 additions and 0 deletions
|
@ -1403,11 +1403,27 @@ abstract class moodle_database {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns number of reads done by this database
|
||||
* @return int
|
||||
*/
|
||||
public function perf_get_reads() {
|
||||
return $this->reads;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns number of writes done by this database
|
||||
* @return int
|
||||
*/
|
||||
public function perf_get_writes() {
|
||||
return $this->writes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns number of queries done by this database
|
||||
* @return int
|
||||
*/
|
||||
public function perf_get_queries() {
|
||||
return $this->writes + $this->reads;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue