Mercurial > hg > cc > cirrus_work
changeset 322:783d65d43fb0 trim
tabulate candidate entries filtered by seg range
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Wed, 21 Jan 2026 19:22:08 +0000 |
| parents | cf50a54b8b53 |
| children | dc7847750384 |
| files | lib/python/cc/lmh/cdb_one.py |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/python/cc/lmh/cdb_one.py Tue Jan 20 19:52:50 2026 +0000 +++ b/lib/python/cc/lmh/cdb_one.py Wed Jan 21 19:22:08 2026 +0000 @@ -21,6 +21,7 @@ C_PAT: typing.Pattern[cython.bytes] = re.compile(b'[^ ]* ([^ ]*) .*{"url": "(http[^"]*).*"filename": "[^"]*\.([0-9][0-9]?)/(warc|robotstxt|crawldiagnostics)/') N: int = 0 + M: int = 0 hits: int = 0 cdx_in: typing.BinaryIO = sys.stdin.buffer @@ -56,6 +57,7 @@ N += 1 seg = int(segb) if (seg >= S and seg < E): + M += 1 nd = shrink_key.shrink_date(wdate, DP) if kind == 'robotstxt': nd += seg @@ -78,7 +80,7 @@ else: raise ValueError((res,l)) cdx_out.write(l) - print('%s entries, %s given lastmod'%(N,hits),file=sys.stderr) + print('%s entries, %s in range, %s given lastmod'%(N,M,hits),file=sys.stderr) sys.stderr.flush() if __name__ == "__main__":
