<s> """<STR_LIT>""" <EOL> import time <EOL> import sys <EOL> import os <EOL> import psutil <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( os . path . dirname ( __file__ ) + '<STR_LIT>' ) ) <EOL> import jedi <EOL> def used_memory ( ) : <EOL> """<STR_LIT>""" <EOL> return psutil . virtual_memory ( ) . used / <NUM_LIT:2> ** <NUM_LIT:20> <EOL> def profile_preload ( mod ) : <EOL> """<STR_LIT>""" <EOL> base = used_memory ( ) <EOL> t0 = time . time ( ) <EOL> jedi . preload_module ( mod ) <EOL> elapsed = time . time ( ) - t0 <EOL> used = used_memory ( ) - base <EOL> return elapsed , used <EOL> def main ( mods ) : <EOL> """<STR_LIT>""" <EOL> t0 = time . time ( ) <EOL> baseline = used_memory ( ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> for mod in mods : <EOL> elapsed , used = profile_preload ( mod ) <EOL> if used > <NUM_LIT:0> : <EOL> print ( '<STR_LIT>' % ( elapsed , used , mod ) ) <EOL> print ( '<STR_LIT>' ) <EOL> elapsed = time . time ( ) - t0 <EOL> used = used_memory ( ) - baseline <EOL> print ( '<STR_LIT>' % ( elapsed , used , '<STR_LIT>' ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if sys . argv [ <NUM_LIT:1> : ] : <EOL> mods = sys . argv [ <NUM_LIT:1> : ] <EOL> else : <EOL> mods = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> main ( mods ) </s>
