Analysis runs show the *store* duration
In the database, the duration of the `store` call is saved. Instead, we should use the check durations available in the `metadata.json`.

Or either add the duration of store to the duration of the analysis, but I believe it's the analysis length which could matter to users.

Thanks to @bruntib, storage is blazing fast anyways.
diff --git a/libcodechecker/analyze/store_handler.py b/libcodechecker/analyze/store_handler.py
index 452c8ff4..0c26b73e 100644
--- a/libcodechecker/analyze/store_handler.py
+++ b/libcodechecker/analyze/store_handler.py
@@ -239,8 +239,8 @@ def addCheckerRun(session, storage_session, command, name, tag, username,
         elif run:
             # There is already a run, update the results.
             run.date = datetime.now()
-            # Increment update counter and the command.
             run.command = command
+            run.duration = -1
             session.flush()
             run_id = run.id
         else:
diff --git a/libcodechecker/libhandlers/store.py b/libcodechecker/libhandlers/store.py
index 5022806e..ab7f45a4 100644
--- a/libcodechecker/libhandlers/store.py
+++ b/libcodechecker/libhandlers/store.py
@@ -231,6 +231,8 @@ def assemble_zip(inputs, zip_file, client):
                         LOG.warning("Skipping '{0}' because it contains "
                                     "a missing source file."
                                     .format(plist_file))
+                elif f == 'metadata.json':
+                    zipf.write(plist_file, os.path.join('reports', f))
 
         necessary_hashes = client.getMissingContentHashes(hash_to_file.keys())
         for f, h in file_to_hash.items():
diff --git a/libcodechecker/server/run_db_model.py b/libcodechecker/server/run_db_model.py
index 61bdbc8b..32929f82 100644
--- a/libcodechecker/server/run_db_model.py
+++ b/libcodechecker/server/run_db_model.py
@@ -64,7 +64,8 @@ class Run(Base):
         self.duration = -1
 
     def mark_finished(self):
-        self.duration = ceil((datetime.now() - self.date).total_seconds())
+        if self.duration == -1:
+            self.duration = ceil((datetime.now() - self.date).total_seconds())
 
 
 class RunHistory(Base):
['libcodechecker/libhandlers/store.py', 'libcodechecker/server/run_db_model.py', 'libcodechecker/analyze/store_handler.py']