mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
add per-connection request counting
This commit is contained in:
parent
66adb470ad
commit
05345ddf8b
|
@ -614,8 +614,6 @@ in the `scripts` folder:
|
|||
|
||||
roughly sorted by priority
|
||||
|
||||
* option to set rgba 126,163,75,0.6 bg on barbuf
|
||||
* include num req in _spd
|
||||
* ctrl-click overrides onclick (tree, ...)
|
||||
* indicate dropped queries in search ui
|
||||
* readme.md as epilogue
|
||||
|
|
|
@ -499,7 +499,7 @@ class HttpCli(object):
|
|||
|
||||
spd1 = get_spd(nbytes, self.t0)
|
||||
spd2 = get_spd(self.conn.nbyte, self.conn.t0)
|
||||
return spd1 + " " + spd2
|
||||
return "{} {} n{}".format(spd1, spd2, self.conn.nreq)
|
||||
|
||||
def handle_post_multipart(self):
|
||||
self.parser = MultipartParser(self.log, self.sr, self.headers)
|
||||
|
@ -1562,7 +1562,7 @@ class HttpCli(object):
|
|||
th_fmt = self.uparam.get("th")
|
||||
if th_fmt is not None:
|
||||
if is_dir:
|
||||
for fn in self.args.th_covers.split(','):
|
||||
for fn in self.args.th_covers.split(","):
|
||||
fp = os.path.join(abspath, fn)
|
||||
if os.path.exists(fp):
|
||||
vrem = "{}/{}".format(vrem.rstrip("/"), fn)
|
||||
|
|
|
@ -43,6 +43,7 @@ class HttpConn(object):
|
|||
|
||||
self.t0 = time.time()
|
||||
self.stopping = False
|
||||
self.nreq = 0
|
||||
self.nbyte = 0
|
||||
self.workload = 0
|
||||
self.u2idx = None
|
||||
|
@ -188,6 +189,7 @@ class HttpConn(object):
|
|||
if self.workload >= 2 ** 31:
|
||||
self.workload = 100
|
||||
|
||||
self.nreq += 1
|
||||
cli = HttpCli(self)
|
||||
if not cli.run():
|
||||
return
|
||||
|
|
|
@ -121,6 +121,7 @@ class VHttpConn(object):
|
|||
self.log_src = "a"
|
||||
self.lf_url = None
|
||||
self.hsrv = VHttpSrv()
|
||||
self.nreq = 0
|
||||
self.nbyte = 0
|
||||
self.workload = 0
|
||||
self.ico = None
|
||||
|
|
Loading…
Reference in a new issue