mozilla / tls-observatory

An observatory for TLS configurations, X509 certificates, and more.
Mozilla Public License 2.0
534 stars 88 forks source link

scanner: batch cert last_seen updates to reduce DB lock contention #423

Closed g-k closed 3 years ago

g-k commented 3 years ago

batch cert last_seen updates to reduce DB lock contention

refs: https://gist.github.com/g-k/7d2e8835399018a51a0407fb4337d75a and prior poking with @Micheletto

Checklist

NB: gofmt and golint have a pile of changes and warnings

I haven't run perf tests, but should be able to verify the changes in stage.

r? @ajvb

g-k commented 3 years ago

:tada: looks liked that worked:

 Avg execution time
    1.38 ms

Times called
    543

Avg rows returned
    2.904

image

image