def track(): bttrack.track(["--dfile", opts['data_file'], "--port", opts['port'], '--bind', opts['interface']])
def track(): bttrack.track(["--dfile", opts['data_file'], "--port", opts['port']])
from BitTornado import PSYCO if PSYCO.psyco: try: import psyco assert psyco.__version__ >= 0x010100f0 psyco.full() except: pass PROFILE = 0 from sys import argv from BitTornado.BT1.track import track if __name__ == '__main__': if PROFILE: import profile, pstats from time import strftime import sys p = profile.Profile() p.runcall(track, argv[1:]) log = open('profile_data.'+strftime('%y%m%d%H%M%S')+'.txt','a') normalstdout = sys.stdout sys.stdout = log # pstats.Stats(p).strip_dirs().sort_stats('cumulative').print_stats() pstats.Stats(p).strip_dirs().sort_stats('time').print_stats() sys.stdout = normalstdout else: track(argv[1:])
# Copyright 2010 Twitter, Inc. # Copyright 2010 Larry Gadea <*****@*****.**> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Usage: python murder_tracker.py <optionalparams> # Usage: python murder_tracker.py import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) from BitTornado.BT1.track import track from sys import argv if __name__ == '__main__': args = ["--dfile", "data", "--port", "8998"] + argv[1:] track(args)
from BitTornado import PSYCO if PSYCO.psyco: try: import psyco assert psyco.__version__ >= 0x010100f0 psyco.full() except: pass PROFILE = 0 from sys import argv from BitTornado.BT1.track import track if __name__ == '__main__': if PROFILE: import profile, pstats from time import strftime import sys p = profile.Profile() p.runcall(track, argv[1:]) log = open('profile_data.' + strftime('%y%m%d%H%M%S') + '.txt', 'a') normalstdout = sys.stdout sys.stdout = log # pstats.Stats(p).strip_dirs().sort_stats('cumulative').print_stats() pstats.Stats(p).strip_dirs().sort_stats('time').print_stats() sys.stdout = normalstdout else: track(argv[1:])
#!/usr/bin/env python # Written by Bram Cohen # see LICENSE.txt for license information PROFILE = 0 import sys from BitTornado.BT1.track import track if __name__ == '__main__': if PROFILE: import profile import pstats from time import strftime p = profile.Profile() p.runcall(track, sys.argv[1:]) log_fname = 'profile_data.' + strftime('%y%m%d%H%M%S') + '.txt' with open(log_fname, 'a') as log: normalstdout, sys.stdout = sys.stdout, log pstats.Stats(p).strip_dirs().sort_stats('time').print_stats() sys.stdout = normalstdout else: track(sys.argv[1:])
def track(): bttrack.track([ "--dfile", opts['data_file'], "--port", opts['port'], '--bind', opts['interface'] ])
# Copyright 2010 Twitter, Inc. # Copyright 2010 Larry Gadea <*****@*****.**> # Copyright 2010 Matt Freels <*****@*****.**> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Usage: python murder_tracker.py <optionalparams> # Usage: python murder_tracker.py import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) from BitTornado.BT1.track import track from sys import argv if __name__ == '__main__': args = ["--dfile", "data", "--port", "8998"] + argv[1:] track(args)