[pitivi/1.0] project_: Measure project loading time.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] project_: Measure project loading time.
- Date: Sat, 25 Nov 2017 18:46:41 +0000 (UTC)
commit 66a4fb47ada9296810b9b160bcba891dada7b3d1
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Nov 10 12:22:50 2017 -0300
project_: Measure project loading time.
Reviewed-by: Alex Băluț <<alexandru balut gmail com>>
Differential Revision: https://phabricator.freedesktop.org/D1884
pitivi/project.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 75fbd34..776cf70 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -127,6 +127,7 @@ class ProjectManager(GObject.Object, Loggable):
self.disable_save = False
self._backup_lock = 0
self.exitcode = 0
+ self.__start_loading_time = 0
def _tryUsingBackupFile(self, uri):
backup_path = self._makeBackupURI(path_from_uri(uri))
@@ -249,6 +250,7 @@ class ProjectManager(GObject.Object, Loggable):
uri = None
# Load the project:
+ self.__start_loading_time = time.time()
project = Project(self.app, uri=uri, scenario=scenario)
self.emit("new-project-loading", project)
@@ -526,6 +528,7 @@ class ProjectManager(GObject.Object, Loggable):
# The user has not made a decision, don't do anything
return False
+ self.__start_loading_time = time.time()
project = Project(self.app, name=DEFAULT_NAME)
self.emit("new-project-loading", project)
@@ -623,6 +626,7 @@ class ProjectManager(GObject.Object, Loggable):
self.emit("new-project-loaded", project)
project.loaded = True
self.time_loaded = time.time()
+ self.info("Loaded in %s", self.time_loaded - self.__start_loading_time)
class Project(Loggable, GES.Project):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]