Commit Graph

2 Commits

Author SHA1 Message Date
Tony Tung
24341537bf [fastmanifest] prune the cache only when the revset is empty
Summary:
Because we now prune in parallel to priming the cache, we no longer need the prune at the end.  The only scenario where we still need to prune is where we never enter the priming loop, i.e., when the revset is empty.

Depends on D3545267, D3544997

Test Plan: since we don't prune in many circumstances any more, the test output is slighty affected.  otherwise, the tests pass.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3547219

Signature: t1:3547219:1468373775:e4535e3a66fb362385a23b992749eb7c3fcf7ea1
2016-07-26 23:35:24 -07:00
Laurent Charignon
0918180a4d fastmanifest: add logging for blackbox
Summary:
There are two parts to add logging to blackbox. Logging events
and changing the configuration of blackbox. This diff does the former.
We don't reuse all the metrics event as:
- blackbox does not support wildcard for events like fastmanifest-*
- they are not meant to be human readable, they are for performance logging

We instead log a few new events:
- What triggered a caching operation?
- What command we run to cache the manifest?
- What revisions are to be cached?
- What revisions are actuallt cached?
- Do we overflow the cache?

This will allow us to understand all the cases where caching didn't trigger.
Like in t11877434.

Test Plan:
Test output does not change
Verified manually by changing the blackbox configuration that events get logged:



  CHGDISABLE=1 hg book food --config blackbox.track='command, commandfinish, commandexception, exthook, fsmonitor, pythonhook, fastmanifest' --config extensions.fastmanifest=/home/lcharignon/facebook-hg-rpms/fb-hgext/fastmanifest --config extensions.blackbox=/home/lcharignon/facebook-hg-rpms/hg-crew/hgext/blackbox.py



Reviewers: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3504158

Tasks: 11877434
2016-07-05 12:24:14 -07:00