summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoryo momma <shutup@oops.wtf>2026-02-04 19:50:53 +0000
committeryo momma <shutup@oops.wtf>2026-02-04 19:50:53 +0000
commitb3f1adfbe7705819ecbae9114f470307146627c2 (patch)
tree74f8f5174c493a6043a10c9c77b00ca9de645be8 /scripts
parente08bd3d51eed082c86b282e44c253040cc2bdfd8 (diff)
Rebrand: remove dump refs from scripts/db/routes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/idgi/filenames.list.txt3
-rwxr-xr-xscripts/logreport.py28
2 files changed, 14 insertions, 17 deletions
diff --git a/scripts/idgi/filenames.list.txt b/scripts/idgi/filenames.list.txt
index 76b751e..cc0c19e 100755
--- a/scripts/idgi/filenames.list.txt
+++ b/scripts/idgi/filenames.list.txt
@@ -28,7 +28,6 @@ images/20100408/1270705138983-humpfm-ryder-Picture-247.png
images/20100408/1270758039197-humpfm-ryder-Picture-254.png
images/20100408/1270764920229-humpfm-ryder-Picture-260.png
images/20100409/1270801759113-humpfm-jertronic-nogetit.png
-images/20100328/1269805908876-humpfm-ryder-dumplift.gif
images/20100319/1268991384841-humpfm-jeanette-Picture-540.png
images/20100410/1270872008733-humpfm-frankhats-Picture-14.png
images/20100410/1270872200318-humpfm-frankhats-dontcatit.jpg
@@ -109,7 +108,6 @@ images/1267361752501-Screen-shot-2010-02-21-at-3.58.28-AM.png
images/1268281646619-Screen-shot-2010-03-10-at-8.26.41-PM.png
images/20100312/1268384300040-humpfm-timb-jertronic.morph.gif
images/20100312/1268387819860-humpfm-timb-ryder.upsidedown.morph.gif
-images/20100319/1268990790344-humpfm-frankhats-dumphone.gif
images/1268284173872-Screen-shot-2010-03-10-at-9.07.49-PM.png
images/1268260418722-notgoingtohappen.gif
images/1268262004981-Picture-353.png
@@ -132,7 +130,6 @@ images/20100319/1268988777710-humpfm-ryder-FINALLYIGETIT.jpg
images/20100319/1268988131400-humpfm-frankhats-dunmom.jpg
images/20100318/1268894764628-humpfm-frankhats-Untitled-3.png
images/1266825851804-Picture-1233.png
-images/20100317/1268813694153-humpfm-ryder-gatesdump.jpg
images/1267294242665-JNETPIZZA.gif
images/1266448158853-idontgetitbot.png
images/1267588831314-Picture-1508.png
diff --git a/scripts/logreport.py b/scripts/logreport.py
index 612a578..fb7626a 100755
--- a/scripts/logreport.py
+++ b/scripts/logreport.py
@@ -104,7 +104,7 @@ def build_js_array(pairs, max_val=None):
def summarize_window(ts, window, slow_threshold):
reqs = 0.0
- dumps = 0.0
+ humps = 0.0
images = 0.0
tags = 0.0
chat_users = 0.0
@@ -116,7 +116,7 @@ def summarize_window(ts, window, slow_threshold):
if group in ('Images', 'Avatars'):
images += 1
elif group in ('Post', 'Upload'):
- dumps += 1
+ humps += 1
elif group in ('TagAdd', 'TagRemove'):
tags += 1
elif group == 'ChatUpdate':
@@ -127,7 +127,7 @@ def summarize_window(ts, window, slow_threshold):
times = [r['time'] for r in window]
return { 'ts': ts,
'reqs': reqs,
- 'dumps': dumps,
+ 'humps': humps,
'images': images,
'tags': tags,
'chat_users': chat_users,
@@ -140,14 +140,14 @@ def summarize_window(ts, window, slow_threshold):
ReportSetLimit = 100
-class DumpReport(object):
+class HumpReport(object):
def __init__(self, interval, slow_thresh=SlowReqThreshold):
self.windows = []
self.interval = interval
self.bytes_sent = 0
self.requests = 0
- self.dumps = 0
+ self.humps = 0
self.slow_requests = 0
self.new_users = 0
self.unclassified_urls = set()
@@ -191,7 +191,7 @@ class DumpReport(object):
group = record['urlgroup']
if group in ('Post', 'Upload'):
- self.dumps += 1
+ self.humps += 1
elif group == 'Register':
self.new_users += 1
@@ -250,8 +250,8 @@ class DumpReport(object):
build_js_array((r['ts'], r['reqs'] / self.interval.seconds) for r in self.windows))
writer.graph('Images/sec', 'images_per_sec',
build_js_array((r['ts'], r['images'] / self.interval.seconds) for r in self.windows))
- writer.graph('Dumps/sec', 'dumps_per_sec',
- build_js_array((r['ts'], r['dumps'] / self.interval.seconds) for r in self.windows))
+ writer.graph('Humps/sec', 'humps_per_sec',
+ build_js_array((r['ts'], r['humps'] / self.interval.seconds) for r in self.windows))
writer.graph('Tags/sec', 'tags_per_sec',
build_js_array((r['ts'], r['tags'] / self.interval.seconds) for r in self.windows))
writer.graph('Chat users/sec', 'users_per_sec',
@@ -393,7 +393,7 @@ def classify_url(method, url):
elif url == '/upload/message':
return 'Upload'
elif url.startswith('/p/'):
- return 'ViewDump'
+ return 'ViewHump'
else:
return 'Other'
@@ -431,7 +431,7 @@ LineFormat = [('addr', str),
('refer', str),
('agent', str)]
-def parse_dump_log_entry(i, l, error_func=None):
+def parse_hump_log_entry(i, l, error_func=None):
comps = [c.strip() for c in l.split('|')]
if len(comps) != len(LineFormat):
if error_func:
@@ -456,14 +456,14 @@ def default_error_handler(i, line, err):
# print "line %s: %s" % (i, err)
pass
-default_line_parser = functools.partial(parse_dump_log_entry,
+default_line_parser = functools.partial(parse_hump_log_entry,
error_func=default_error_handler)
-def analyze_dump_log(path,
+def analyze_hump_log(path,
interval=WindowInterval,
line_parser=default_line_parser,
timekey='ts'):
- report = DumpReport(interval)
+ report = HumpReport(interval)
with open(path, 'r') as f:
for ts, window in yield_log_windows(f, interval, line_parser, timekey):
report.record_window(ts, window)
@@ -477,7 +477,7 @@ if __name__ == "__main__":
outpath = sys.argv[2] if len(sys.argv) > 2 else None
Nickset = fetch_nicks()
- report = analyze_dump_log(logpath)
+ report = analyze_hump_log(logpath)
if outpath:
report.write_report(outpath)