diff options
| author | yo momma <shutup@oops.wtf> | 2026-02-04 19:50:53 +0000 |
|---|---|---|
| committer | yo momma <shutup@oops.wtf> | 2026-02-04 19:50:53 +0000 |
| commit | b3f1adfbe7705819ecbae9114f470307146627c2 (patch) | |
| tree | 74f8f5174c493a6043a10c9c77b00ca9de645be8 | |
| parent | e08bd3d51eed082c86b282e44c253040cc2bdfd8 (diff) | |
Rebrand: remove dump refs from scripts/db/routes
| -rw-r--r-- | ROUTES | 12 | ||||
| -rwxr-xr-x | db/0-create.psql | 4 | ||||
| -rwxr-xr-x | db/0-create.psql-altered | 4 | ||||
| -rwxr-xr-x | scripts/idgi/filenames.list.txt | 3 | ||||
| -rwxr-xr-x | scripts/logreport.py | 28 |
5 files changed, 24 insertions, 27 deletions
@@ -31,8 +31,8 @@ (GET "/t/:topic" (topic session (params :topic))) (GET "/u/:nick" (redirect-to (str "/" (params :nick)))) (GET "/u/:nick/" (redirect-to (str "/" (params :nick)))) - (GET "/u/:nick/tag/:tag" (tagged-dumps-by-nick session params (request-url request))) - (GET "/u/:nick/tag/:tag/:offset" (tagged-dumps-by-nick session params (request-url request))) + (GET "/u/:nick/tag/:tag" (tagged-humps-by-nick session params (request-url request))) + (GET "/u/:nick/tag/:tag/:offset" (tagged-humps-by-nick session params (request-url request))) (GET "/u/:nick/favorites" (redirect-to (format "/%s/favorites" (params :nick)))) (GET "/u/:nick/favorites/:offset" (redirect-to (format "/%s/favorites" (params :nick)))) (GET "/json/:nick/favorites" (json-favorites session params)) @@ -46,8 +46,8 @@ (GET "/registerdis" (serve-static "static" "registerdis.html")) (GET "/browser" (browser session)) (GET "/refresh" (validated-refresh session params)) # MOST IMPORTANT - (GET "/tag/:tag" (tagged-dumps session params (request-url request))) - (GET "/tag/:tag/:offset" (tagged-dumps session params (request-url request))) + (GET "/tag/:tag" (tagged-humps session params (request-url request))) + (GET "/tag/:tag/:offset" (tagged-humps session params (request-url request))) (GET "/altars" (altar-log session params)) (GET "/altars/" (altar-log session params)) (GET "/altars/:id" (if (maybe-parse-int (params :id) false) @@ -92,8 +92,8 @@ (GET "/:nick/altars" (altar-log session params)) (GET "/:nick/altars/" (altar-log session params)) (GET "/:nick/altars/:id" (altar-log session params)) - (GET "/:nick/tag/:tag" (tagged-dumps-by-nick session params (request-url request))) - (GET "/:nick/tag/:tag/:offset" (tagged-dumps-by-nick session params (request-url request))) + (GET "/:nick/tag/:tag" (tagged-humps-by-nick session params (request-url request))) + (GET "/:nick/tag/:tag/:offset" (tagged-humps-by-nick session params (request-url request))) (GET "/:nick/favorites" (favorites-handler session (params :nick) nil nil)) (GET "/:nick/favorites/" (favorites-handler session (params :nick) nil nil)) (GET "/:nick/favorites/:date" (favorites-handler session (params :nick) (params :date) nil)) diff --git a/db/0-create.psql b/db/0-create.psql index 979eb68..586d52f 100755 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -53,11 +53,11 @@ CREATE TABLE messages ( is_text bool NOT NULL DEFAULT false ); --- historical image dumps per user +-- historical image humps per user CREATE INDEX messages_user_created_on_image_only_idx ON messages (user_id, created_on) WHERE is_image; --- historical image dumps in a room. needs to handle non-image messages. +-- historical image humps in a room. needs to handle non-image messages. CREATE INDEX messages_room_id_created_on_idx ON messages (room_id, created_on); CREATE TABLE image_altars ( diff --git a/db/0-create.psql-altered b/db/0-create.psql-altered index 48dba34..b070506 100755 --- a/db/0-create.psql-altered +++ b/db/0-create.psql-altered @@ -53,11 +53,11 @@ CREATE TABLE messages ( is_text bool NOT NULL DEFAULT false ); --- historical image dumps per user +-- historical image humps per user CREATE INDEX messages_user_created_on_image_only_idx ON messages (user_id, created_on) WHERE is_image; --- historical image dumps in a room. needs to handle non-image messages. +-- historical image humps in a room. needs to handle non-image messages. CREATE INDEX messages_room_id_created_on_idx ON messages (room_id, created_on); CREATE TABLE image_altars ( 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) |
