Skip to content

Commit 19e81c6

Browse files
committed
print slow docs/comps docs
1 parent 6376e49 commit 19e81c6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

elixir/update.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os.path
22
import logging
3+
import time
34
from multiprocessing import cpu_count, set_start_method
45
from multiprocessing.pool import Pool
56
from typing import Dict, Iterable, List, Optional, Tuple, Set
@@ -247,7 +248,13 @@ def get_docs(file_id: FileId) -> Optional[Tuple[int, str, LinesListDict]]:
247248
family = getFileFamily(filename)
248249
if family in (None, 'M'): return
249250

251+
start = time.time()
250252
lines = (line.decode() for line in scriptLines('parse-docs', hash, filename))
253+
parser_time = time.time()-start
254+
255+
if parser_time > 10:
256+
print("docs timeout", parser_time, file_id)
257+
251258
docs = collect_get_blob_output(lines)
252259

253260
return (idx, family, docs)
@@ -259,7 +266,14 @@ def get_comps(file_id: FileId) -> Optional[Tuple[int, str, LinesListDict]]:
259266
if family in (None, 'K', 'M'): return
260267

261268
compatibles_parser = FindCompatibleDTS()
269+
270+
start = time.time()
262271
lines = compatibles_parser.run(scriptLines('get-blob', hash), family)
272+
parser_time = time.time()-start
273+
274+
if parser_time > 10:
275+
print("comps docs timeout", parser_time, file_id)
276+
263277
comps = collect_get_blob_output(lines)
264278

265279
return (idx, family, comps)
@@ -340,6 +354,9 @@ def update_version(db: DB, tag: bytes, pool: Pool, dts_comp_support: bool):
340354
set_start_method('spawn')
341355
with Pool() as pool:
342356
for tag in scriptLines('list-tags'):
357+
if not tag.startswith(b'v6.1') or b'rc' in tag:
358+
continue
359+
343360
if not db.vers.exists(tag):
344361
logger.info("updating tag %s", tag)
345362
update_version(db, tag, pool, dts_comp_support)

0 commit comments

Comments
 (0)