diff options
Diffstat (limited to 'lib/public/Profiler')
-rw-r--r-- | lib/public/Profiler/IProfile.php | 23 | ||||
-rw-r--r-- | lib/public/Profiler/IProfiler.php | 29 |
2 files changed, 12 insertions, 40 deletions
diff --git a/lib/public/Profiler/IProfile.php b/lib/public/Profiler/IProfile.php index 1831496a5a7..89eb709d061 100644 --- a/lib/public/Profiler/IProfile.php +++ b/lib/public/Profiler/IProfile.php @@ -3,25 +3,8 @@ declare(strict_types=1); /** - * @copyright 2022 Carl Schwan <carl@carlschwan.eu> - * - * @author Carl Schwan <carl@carlschwan.eu> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Profiler; @@ -34,7 +17,7 @@ use OCP\DataCollector\IDataCollector; * * ```php * <?php - * $profiler = \OC::$server->get(IProfiler::class); + * $profiler = \OCP\Server::get(IProfiler::class); * $profiles = $profiler->find('/settings/users', 10); * ``` * diff --git a/lib/public/Profiler/IProfiler.php b/lib/public/Profiler/IProfiler.php index 78325089523..0ad446d6749 100644 --- a/lib/public/Profiler/IProfiler.php +++ b/lib/public/Profiler/IProfiler.php @@ -3,25 +3,8 @@ declare(strict_types=1); /** - * @copyright 2022 Carl Schwan <carl@carlschwan.eu> - * - * @author Carl Schwan <carl@carlschwan.eu> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Profiler; @@ -67,7 +50,7 @@ interface IProfiler { * Find a profile from various search parameters * @since 24.0.0 */ - public function find(?string $url, ?int $limit, ?string $method, ?int $start, ?int $end, string $statusCode = null): array; + public function find(?string $url, ?int $limit, ?string $method, ?int $start, ?int $end, ?string $statusCode = null): array; /** * Get the list of data providers by identifier @@ -98,4 +81,10 @@ interface IProfiler { * @since 24.0.0 */ public function collect(Request $request, Response $response): IProfile; + + /** + * Clear the stored profiles + * @since 25.0.0 + */ + public function clear(): void; } |