flask-pluginkit-accesscount 0.3.0__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flask-pluginkit-accesscount
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: IP、PV、Endpoint Statistics
5
5
  Home-page: https://github.com/saintic/flask-pluginkit-accesscount
6
6
  Download-URL: https://github.com/saintic/flask-pluginkit-accesscount
@@ -20,7 +20,7 @@ from prettytable import PrettyTable
20
20
  __plugin_name__ = "AccessCount"
21
21
  __description__ = "IP、PV、Endpoint Statistics"
22
22
  __author__ = "Hiroshi.tao <me@tcw.im>"
23
- __version__ = "0.3.0"
23
+ __version__ = "0.3.2"
24
24
  __license__ = "BSD 3-Clause"
25
25
  __license_file__ = "LICENSE"
26
26
  __readme_file__ = "README.md"
@@ -30,9 +30,9 @@ __state__ = "enabled"
30
30
  # 默认key前缀
31
31
  default_key_prefix: str = "pluginkit"
32
32
  # 刷新次数,默认100次,即达到累计次数后写入redis
33
- default_flush_times = 10
33
+ default_flush_times = 100
34
34
  # 刷新间隔,默认60秒,即达到时间间隔后写入redis
35
- default_flush_interval = 10
35
+ default_flush_interval = 60
36
36
 
37
37
  # 进程统计数据,格式为 {pid: dict(ep=dict(endpoint=count), pv=count),ts=timestamp,times=0}
38
38
  # ep 端点访问量, pv 访问量, ts 上次刷新的时间戳, times 累计访问次数
@@ -165,8 +165,8 @@ def print_pv(
165
165
  for i in column:
166
166
  pipe.hget(key, i.replace("-", ""))
167
167
  row = pipe.execute()
168
- row.append(sum(map(pv_value_filter, row)) / day)
169
- except Exception as e:
168
+ row.append(int(sum(map(pv_value_filter, row)) / day))
169
+ except Exception:
170
170
  raise
171
171
  else:
172
172
  column.append("平均")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flask-pluginkit-accesscount
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: IP、PV、Endpoint Statistics
5
5
  Home-page: https://github.com/saintic/flask-pluginkit-accesscount
6
6
  Download-URL: https://github.com/saintic/flask-pluginkit-accesscount