home
/
code
/
tt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edadb80
)
Measure and report timeline download time
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 22 Mar 2021 15:52:35 +0000
(11:52 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 22 Mar 2021 15:52:35 +0000
(11:52 -0400)
tt.rkt
patch
|
blob
|
blame
|
history
diff --git
a/tt.rkt
b/tt.rkt
index
b6b6bd5
..
f290eec
100644
(file)
--- a/
tt.rkt
+++ b/
tt.rkt
@@
-354,7
+354,7
@@
(define (feed-download f)
(match-define (feed nick uri) f)
(define u (url->string uri))
(define (feed-download f)
(match-define (feed nick uri) f)
(define u (url->string uri))
- (log-info "Downloading feed
nick:~a uri:~a" nick
u)
+ (log-info "Downloading feed
uri:~a"
u)
(with-handlers
([exn:fail?
(λ (e)
(with-handlers
([exn:fail?
(λ (e)
@@
-366,7
+366,7
@@
#f)])
(define-values (_result _tm-cpu-ms tm-real-ms _tm-gc-ms)
(time-apply uri-download (list uri)))
#f)])
(define-values (_result _tm-cpu-ms tm-real-ms _tm-gc-ms)
(time-apply uri-download (list uri)))
- (log-info "
D
ownloaded in ~a seconds, uri: ~a" (/ tm-real-ms 1000.0) u)))
+ (log-info "
Feed d
ownloaded in ~a seconds, uri: ~a" (/ tm-real-ms 1000.0) u)))
(: timeline-download (-> Integer (Listof Feed) Void))
(define (timeline-download num-workers feeds)
(: timeline-download (-> Integer (Listof Feed) Void))
(define (timeline-download num-workers feeds)
@@
-431,7
+431,11
@@
njobs "Number of concurrent jobs."
(set! num-workers (string->number njobs))]
#:args (filename)
njobs "Number of concurrent jobs."
(set! num-workers (string->number njobs))]
#:args (filename)
- (timeline-download num-workers (file->feeds filename))))]
+ (define-values (_res _cpu real-ms _gc)
+ (time-apply timeline-download (list num-workers (file->feeds filename))))
+ ; TODO Sync with logger before exit
+ (eprintf "Timeline downloaded in ~a seconds.~n" (/ real-ms 1000.0))
+ ))]
[(or "u" "upload")
(command-line
#:program
[(or "u" "upload")
(command-line
#:program
This page took
0.022348 seconds
and
4
git commands to generate.