Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Held <ilovemilk@wusa.io>2018-08-28 19:15:36 +0300
committerMatthias Held <ilovemilk@wusa.io>2018-08-28 19:15:36 +0300
commit82474c2dc4333f32f03cb0258f0371ce8059f2da (patch)
tree85e062c46ca079b6a9c84e7c7141c1010b702187 /lib
parent07ffeca5acfb0da379c81f6ee2ded0f6fa3ec07e (diff)
Add scan duration
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/ScanController.php4
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);
}
/**