diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-10-03 20:39:09 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-10-20 13:38:38 +0200 |
commit | 6e08014781ea0099d7e4466dd48d80af63d8ab69 (patch) | |
tree | 393c2848c85c56faf108fb4add77ad26a3156f78 /lib/public/diagnostics | |
parent | 2790bda4f8d6452e65e28935cee62e1ab5468acf (diff) | |
download | nextcloud-server-6e08014781ea0099d7e4466dd48d80af63d8ab69.tar.gz nextcloud-server-6e08014781ea0099d7e4466dd48d80af63d8ab69.zip |
Rename namespace to Diagnostics
Diffstat (limited to 'lib/public/diagnostics')
-rw-r--r-- | lib/public/diagnostics/ievent.php | 36 | ||||
-rw-r--r-- | lib/public/diagnostics/ieventlogger.php | 31 | ||||
-rw-r--r-- | lib/public/diagnostics/iquery.php | 26 | ||||
-rw-r--r-- | lib/public/diagnostics/iquerylogger.php | 27 |
4 files changed, 120 insertions, 0 deletions
diff --git a/lib/public/diagnostics/ievent.php b/lib/public/diagnostics/ievent.php new file mode 100644 index 00000000000..a2a3461f68a --- /dev/null +++ b/lib/public/diagnostics/ievent.php @@ -0,0 +1,36 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Diagnostics; + +interface IEvent { + /** + * @return string + */ + public function getId(); + + /** + * @return string + */ + public function getDescription(); + + /** + * @return float + */ + public function getStart(); + + /** + * @return float + */ + public function getEnd(); + + /** + * @return float + */ + public function getDuration(); +} diff --git a/lib/public/diagnostics/ieventlogger.php b/lib/public/diagnostics/ieventlogger.php new file mode 100644 index 00000000000..fa5880bfea6 --- /dev/null +++ b/lib/public/diagnostics/ieventlogger.php @@ -0,0 +1,31 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Diagnostics; + +interface IEventLogger { + /** + * Mark the start of an event + * + * @param string $id + * @param string $description + */ + public function start($id, $description); + + /** + * Mark the end of an event + * + * @param string $id + */ + public function end($id); + + /** + * @return \OCP\Diagnostics\IEvent[] + */ + public function getEvents(); +} diff --git a/lib/public/diagnostics/iquery.php b/lib/public/diagnostics/iquery.php new file mode 100644 index 00000000000..f1111e069bb --- /dev/null +++ b/lib/public/diagnostics/iquery.php @@ -0,0 +1,26 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Diagnostics; + +interface IQuery { + /** + * @return string + */ + public function getSql(); + + /** + * @return array + */ + public function getParams(); + + /** + * @return float + */ + public function getDuration(); +} diff --git a/lib/public/diagnostics/iquerylogger.php b/lib/public/diagnostics/iquerylogger.php new file mode 100644 index 00000000000..0fba9eb8b10 --- /dev/null +++ b/lib/public/diagnostics/iquerylogger.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Diagnostics; + +use Doctrine\DBAL\Logging\SQLLogger; + +interface IQueryLogger extends SQLLogger { + /** + * @param string $sql + * @param array $params + * @param array $types + */ + public function startQuery($sql, array $params = null, array $types = null); + + public function stopQuery(); + + /** + * @return \OCP\Diagnostics\IQuery[] + */ + public function getQueries(); +} |