shadowshell 0.0.32__tar.gz → 0.0.34__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shadowshell-0.0.32 → shadowshell-0.0.34}/PKG-INFO +1 -1
- {shadowshell-0.0.32 → shadowshell-0.0.34}/pyproject.toml +1 -1
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/bootstrap.py +20 -15
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell.egg-info/PKG-INFO +1 -1
- {shadowshell-0.0.32 → shadowshell-0.0.34}/README.md +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/setup.cfg +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/__init__.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/configurator.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/console_logger.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/git_shell.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/logger.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/logger_factory.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell/stock_trader.py +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell.egg-info/SOURCES.txt +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell.egg-info/dependency_links.txt +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell.egg-info/requires.txt +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/src/shadowshell.egg-info/top_level.txt +0 -0
- {shadowshell-0.0.32 → shadowshell-0.0.34}/tests/tests.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "shadowshell" # 全局唯一名称(检查PyPI是否被占用)
|
|
7
7
|
#version = "0.0.24" # 版本号(每次更新需递增)
|
|
8
|
-
version = "0.0.
|
|
8
|
+
version = "0.0.34" # 版本号(每次更新需递增)
|
|
9
9
|
authors = [{ name = "shadowshell", email = "shadowshellxyz@foxmail.com" }]
|
|
10
10
|
description = "www.shadowshell.xyz"
|
|
11
11
|
readme = "README.md"
|
|
@@ -77,24 +77,29 @@ def performance_monitor(func):
|
|
|
77
77
|
start = time.perf_counter()
|
|
78
78
|
result = func(*args, **kwargs)
|
|
79
79
|
elapsed = time.perf_counter() - start
|
|
80
|
-
logger.info(f"[PERFORMANCE_MONITOR][{func.__name__}] has ran, time elapsed:{elapsed:.6f}
|
|
80
|
+
logger.info(f"[PERFORMANCE_MONITOR][{func.__name__}] has ran, time elapsed:{elapsed:.6f}s.")
|
|
81
81
|
return result
|
|
82
82
|
return wrapper
|
|
83
83
|
|
|
84
|
-
def function_monitor(
|
|
85
|
-
def
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
def function_monitor(clazz=None):
|
|
85
|
+
def decorator(func):
|
|
86
|
+
def wrapper(*args, **kwargs):
|
|
87
|
+
start = time.perf_counter()
|
|
88
|
+
try:
|
|
89
|
+
result = func(*args, **kwargs)
|
|
90
|
+
except Exception as e:
|
|
91
|
+
logger.error(e)
|
|
92
|
+
except:
|
|
93
|
+
logger.error(sys.exc_info()[0])
|
|
94
|
+
finally:
|
|
95
|
+
elapsed = time.perf_counter() - start
|
|
96
|
+
if (clazz is not None):
|
|
97
|
+
logger.info(f"[FUNCTION_MONITOR][{clazz.__name__}][{func.__name__}] has ran, time elapsed:{elapsed:.6f}s.")
|
|
98
|
+
else:
|
|
99
|
+
logger.info(f"[FUNCTION_MONITOR][{func.__name__}] has ran, time elapsed:{elapsed:.6f}s.")
|
|
100
|
+
return result
|
|
101
|
+
return wrapper
|
|
102
|
+
return decorator
|
|
98
103
|
|
|
99
104
|
def testserver():
|
|
100
105
|
os.system("ping shadowshell.xyz")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|