MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / report_summary

Function report_summary

pokecli.py:326–359  ·  view source on GitHub ↗
(bot)

Source from the content-addressed store, hash-verified

324
325
326def report_summary(bot):
327 if bot.metrics.start_time is None:
328 return # Bot didn't actually start, no metrics to show.
329
330 metrics = bot.metrics
331 try:
332 metrics.capture_stats()
333 except NotLoggedInException:
334 bot.event_manager.emit(
335 'api_error',
336 sender=bot,
337 level='info',
338 formatted='Not logged in, reconnecting in {:d} seconds'.format(5)
339 )
340 time.sleep(5)
341 return
342 logger.info('')
343 logger.info('Ran for {}'.format(metrics.runtime()))
344 logger.info('Total XP Earned: {} Average: {:.2f}/h'.format(metrics.xp_earned(), metrics.xp_per_hour()))
345 logger.info('Travelled {:.2f}km'.format(metrics.distance_travelled()))
346 logger.info('Visited {} stops'.format(metrics.visits['latest'] - metrics.visits['start']))
347 logger.info('Encountered {} pokemon, {} caught, {} released, {} evolved, {} never seen before ({})'
348 .format(metrics.num_encounters(), metrics.num_captures(), metrics.releases,
349 metrics.num_evolutions(), metrics.num_new_mons(), metrics.uniq_caught()))
350 logger.info('Threw {} pokeball{}'.format(metrics.num_throws(), '' if metrics.num_throws() == 1 else 's'))
351 logger.info('Earned {} Stardust'.format(metrics.earned_dust()))
352 logger.info('Hatched eggs {}'.format(metrics.hatched_eggs(0)))
353 if (metrics.next_hatching_km(0)):
354 logger.info('Next egg hatches in {:.2f} km'.format(metrics.next_hatching_km(0)))
355 logger.info('')
356 if metrics.highest_cp is not None:
357 logger.info('Highest CP Pokemon: {}'.format(metrics.highest_cp['desc']))
358 if metrics.most_perfect is not None:
359 logger.info('Most Perfect Pokemon: {}'.format(metrics.most_perfect['desc']))
360
361
362def init_config():

Callers 1

mainFunction · 0.85

Calls 15

capture_statsMethod · 0.80
emitMethod · 0.80
runtimeMethod · 0.80
xp_earnedMethod · 0.80
xp_per_hourMethod · 0.80
distance_travelledMethod · 0.80
num_encountersMethod · 0.80
num_capturesMethod · 0.80
num_evolutionsMethod · 0.80
num_new_monsMethod · 0.80
uniq_caughtMethod · 0.80
num_throwsMethod · 0.80

Tested by

no test coverage detected