##// END OF EJS Templates
delta-find: intrduce a `_one_dbg_data` method...
marmoute -
r51544:d1dc4a03 stable
parent child Browse files
Show More
@@ -1437,17 +1437,18 b' class deltacomputer:'
1437 and dbg_try_count == 1
1437 and dbg_try_count == 1
1438 and deltainfo.base == cachedelta[0]
1438 and deltainfo.base == cachedelta[0]
1439 )
1439 )
1440 dbg = {
1440 dbg = self._one_dbg_data()
1441 'duration': end - start,
1441 dbg['duration'] = end - start
1442 'revision': target_rev,
1442 dbg['revision'] = target_rev
1443 'delta-base': deltainfo.base, # pytype: disable=attribute-error
1443 dbg[
1444 'search_round_count': dbg_try_rounds,
1444 'delta-base'
1445 'using-cached-base': used_cached,
1445 ] = deltainfo.base # pytype: disable=attribute-error
1446 'delta_try_count': dbg_try_count,
1446 dbg['search_round_count'] = dbg_try_rounds
1447 'type': dbg_type,
1447 dbg['using-cached-base'] = used_cached
1448 'p1-chain-len': p1_chain_len,
1448 dbg['delta_try_count'] = dbg_try_count
1449 'p2-chain-len': p2_chain_len,
1449 dbg['type'] = dbg_type
1450 }
1450 dbg['p1-chain-len'] = p1_chain_len
1451 dbg['p2-chain-len'] = p2_chain_len
1451 if (
1452 if (
1452 deltainfo.snapshotdepth # pytype: disable=attribute-error
1453 deltainfo.snapshotdepth # pytype: disable=attribute-error
1453 is not None
1454 is not None
@@ -1474,6 +1475,21 b' class deltacomputer:'
1474 self._dbg_process_data(dbg)
1475 self._dbg_process_data(dbg)
1475 return deltainfo
1476 return deltainfo
1476
1477
1478 def _one_dbg_data(self):
1479 return {
1480 'duration': None,
1481 'revision': None,
1482 'delta-base': None,
1483 'search_round_count': None,
1484 'using-cached-base': None,
1485 'delta_try_count': None,
1486 'type': None,
1487 'p1-chain-len': None,
1488 'p2-chain-len': None,
1489 'snapshot-depth': None,
1490 'target-revlog': None,
1491 }
1492
1477 def _dbg_process_data(self, dbg):
1493 def _dbg_process_data(self, dbg):
1478 if self._debug_info is not None:
1494 if self._debug_info is not None:
1479 self._debug_info.append(dbg)
1495 self._debug_info.append(dbg)
General Comments 0
You need to be logged in to leave comments. Login now