diff options
author | Matthias Held <ilovemilk@wusa.io> | 2018-08-28 19:15:36 +0300 |
---|---|---|
committer | Matthias Held <ilovemilk@wusa.io> | 2018-08-28 19:15:36 +0300 |
commit | 82474c2dc4333f32f03cb0258f0371ce8059f2da (patch) | |
tree | 85e062c46ca079b6a9c84e7c7141c1010b702187 /lib | |
parent | 07ffeca5acfb0da379c81f6ee2ded0f6fa3ec07e (diff) |
Add scan duration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/ScanController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Controller/ScanController.php b/lib/Controller/ScanController.php index 4f0ac71..3d188df 100644 --- a/lib/Controller/ScanController.php +++ b/lib/Controller/ScanController.php @@ -181,6 +181,7 @@ class ScanController extends OCSController */ public function filesToScan() { + $start = time(); $storageStructure = $this->getStorageStructure($this->userFolder); $trashStorageStructure = $this->getTrashStorageStructure(); @@ -219,8 +220,9 @@ class ScanController extends OCSController $sequence[] = $allFiles[$i]; } $sequencesArray[] = $sequence; + $end = time(); - return new JSONResponse(['status' => 'success', 'sequences' => $sequencesArray, 'number_of_files' => $storageStructure->getNumberOfFiles()], Http::STATUS_ACCEPTED); + return new JSONResponse(['status' => 'success', 'sequences' => $sequencesArray, 'number_of_files' => $storageStructure->getNumberOfFiles(), 'scan_duration' => $end - $start], Http::STATUS_ACCEPTED); } /** |