mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 22:25:53 +08:00
CURA-5197 Add Cura booting time to the logs.
This commit is contained in:
parent
7eba73adc5
commit
f23491377f
@ -106,6 +106,7 @@ import copy
|
||||
import os
|
||||
import argparse
|
||||
import json
|
||||
import time
|
||||
|
||||
|
||||
numpy.seterr(all="ignore")
|
||||
@ -143,6 +144,7 @@ class CuraApplication(QtApplication):
|
||||
Q_ENUMS(ResourceTypes)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._boot_loading_time = time.time()
|
||||
# this list of dir names will be used by UM to detect an old cura directory
|
||||
for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]:
|
||||
Resources.addExpectedDirNameInData(dir_name)
|
||||
@ -701,6 +703,7 @@ class CuraApplication(QtApplication):
|
||||
self._post_start_timer.timeout.connect(self._onPostStart)
|
||||
self._post_start_timer.start()
|
||||
|
||||
Logger.log("d", "Booting Cura took %s seconds", time.time() - self._boot_loading_time)
|
||||
self.exec_()
|
||||
|
||||
def _onPostStart(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user