1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
Index: b/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py
===================================================================
--- a/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py
+++ b/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py
@@ -293,7 +293,7 @@ class scopedef_t(declaration.declaration
if self.name == '::':
self._logger.debug(
"preparing data structures for query optimizer - started")
- start_time = time.clock()
+ start_time = time.perf_counter()
self.clear_optimizer()
@@ -327,7 +327,7 @@ class scopedef_t(declaration.declaration
if self.name == '::':
self._logger.debug((
"preparing data structures for query optimizer - " +
- "done( %f seconds ). "), (time.clock() - start_time))
+ "done( %f seconds ). "), (time.perf_counter() - start_time))
self._optimized = True
@staticmethod
@@ -475,7 +475,7 @@ class scopedef_t(declaration.declaration
def _find_single(self, match_class, **keywds):
"""implementation details"""
self._logger.debug('find single query execution - started')
- start_time = time.clock()
+ start_time = time.perf_counter()
norm_keywds = self.__normalize_args(**keywds)
decl_matcher = self.__create_matcher(match_class, **norm_keywds)
dtype = self.__findout_decl_type(match_class, **norm_keywds)
@@ -484,13 +484,13 @@ class scopedef_t(declaration.declaration
found = matcher.get_single(decl_matcher, decls, False)
self._logger.debug(
'find single query execution - done( %f seconds )',
- (time.clock() - start_time))
+ (time.perf_counter() - start_time))
return found
def _find_multiple(self, match_class, **keywds):
"""implementation details"""
self._logger.debug('find all query execution - started')
- start_time = time.clock()
+ start_time = time.perf_counter()
norm_keywds = self.__normalize_args(**keywds)
decl_matcher = self.__create_matcher(match_class, **norm_keywds)
dtype = self.__findout_decl_type(match_class, **norm_keywds)
@@ -502,7 +502,7 @@ class scopedef_t(declaration.declaration
self._logger.debug('%d declaration(s) that match query', len(mfound))
self._logger.debug(
'find single query execution - done( %f seconds )',
- (time.clock() - start_time))
+ (time.perf_counter() - start_time))
if not mfound and not allow_empty:
raise RuntimeError(
"Multi declaration query returned 0 declarations.")
Index: b/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
===================================================================
--- a/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
+++ b/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
@@ -188,11 +188,11 @@ class file_cache_t(cache_base_t):
cache_file_obj = open(file_name, 'rb')
try:
file_cache_t.logger.info('Loading cache file "%s".', file_name)
- start_time = time.clock()
+ start_time = time.perf_counter()
cache = pickle.load(cache_file_obj)
file_cache_t.logger.debug(
"Cache file has been loaded in %.1f secs",
- (time.clock() - start_time))
+ (time.perf_counter() - start_time))
file_cache_t.logger.debug(
"Found cache in file: [%s] entries: %s",
file_name, len(list(cache.keys())))
Index: b/Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
===================================================================
--- a/Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
+++ b/Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
@@ -316,11 +316,11 @@ class project_reader_t(object):
namespaces.append(decls)
self.logger.debug("Flushing cache... ")
- start_time = time.clock()
+ start_time = time.perf_counter()
self.__dcache.flush()
self.logger.debug(
"Cache has been flushed in %.1f secs",
- (time.clock() - start_time))
+ (time.perf_counter() - start_time))
answer = []
self.logger.debug("Joining namespaces ...")
for file_nss in namespaces:
|