diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2014-01-23 12:32:36 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2014-01-23 12:32:36 +0000 |
commit | 6a753a0777ba389b0d2dc455c8419b311548d510 (patch) | |
tree | a459857ffa29ae1a3cb73ea2151714b8cfb86f53 /www | |
parent | cd042a944dbfb5c874b9d2717cc33d1060070682 (diff) | |
download | ports-6a753a0777ba389b0d2dc455c8419b311548d510.tar.gz ports-6a753a0777ba389b0d2dc455c8419b311548d510.zip |
Notes
Diffstat (limited to 'www')
-rw-r--r-- | www/uwsgitop/Makefile | 1 | ||||
-rw-r--r-- | www/uwsgitop/files/patch-uwsgitop | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/www/uwsgitop/Makefile b/www/uwsgitop/Makefile index ef47b9ced851..90c7caf5e98d 100644 --- a/www/uwsgitop/Makefile +++ b/www/uwsgitop/Makefile @@ -3,6 +3,7 @@ PORTNAME= uwsgitop PORTVERSION= 0.6.2 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_CHEESESHOP} MASTER_SITE_SUBDIR=source/u/${PORTNAME} diff --git a/www/uwsgitop/files/patch-uwsgitop b/www/uwsgitop/files/patch-uwsgitop new file mode 100644 index 000000000000..6f0071ae318b --- /dev/null +++ b/www/uwsgitop/files/patch-uwsgitop @@ -0,0 +1,35 @@ +--- uwsgitop.bak ++++ uwsgitop +@@ -82,12 +82,8 @@ except: + pass + screen.clear() + +-def reqcount(a, b): +- if a['requests'] > b['requests']: +- return -1 +- if a['requests'] < b['requests']: +- return 1 +- return 0 ++def reqcount(item): ++ return item['requests'] + + def calc_percent(tot, req): + if tot == 0: +@@ -112,7 +108,7 @@ while True: + data = s.recv(4096) + if len(data) < 1: + break +- js += data ++ js += data.decode('utf8') + except: + raise Exception("unable to get uWSGI statistics") + +@@ -175,7 +171,7 @@ while True: + screen.addstr(2, 0, " WID\t%\tPID\tREQ\tRPS\tEXC\tSIG\tSTATUS\tAVG\tRSS\tVSZ\tTX\tRunT\t", curses.A_REVERSE) + pos = 3 + +- dd['workers'].sort(reqcount) ++ dd['workers'].sort(key=reqcount) + for worker in dd['workers']: + sigs = 0 + wtx = human_size(worker['tx']) |