PATH: //proc/self/root/proc/self/root/opt/alt/python36/lib64/python3.6
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
š __future__.py
ā
X
š __phello__.foo.py
ā
X
š __pycache__/
X
š _bootlocale.py
ā
X
š _collections_abc.py
ā
X
š _compat_pickle.py
ā
X
š _compression.py
ā
X
š _dummy_thread.py
ā
X
š _markupbase.py
ā
X
š _osx_support.py
ā
X
š _pydecimal.py
ā
X
š _pyio.py
ā
X
š _sitebuiltins.py
ā
X
š _strptime.py
ā
X
š _sysconfigdata_dm_linux_x86_64-linux-gnu.py
ā
X
š _sysconfigdata_m_linux_x86_64-linux-gnu.py
ā
X
š _threading_local.py
ā
X
š _weakrefset.py
ā
X
š abc.py
ā
X
š aifc.py
ā
X
š antigravity.py
ā
X
š argparse.py
ā
X
š ast.py
ā
X
š asynchat.py
ā
X
š asyncio/
X
š asyncore.py
ā
X
š base64.py
ā
X
š bdb.py
ā
X
š binhex.py
ā
X
š bisect.py
ā
X
š bz2.py
ā
X
š cProfile.py
ā
X
š calendar.py
ā
X
š cgi.py
ā
X
š cgitb.py
ā
X
š chunk.py
ā
X
š cmd.py
ā
X
š code.py
ā
X
š codecs.py
ā
X
š codeop.py
ā
X
š collections/
X
š colorsys.py
ā
X
š compileall.py
ā
X
š concurrent/
X
š config-3.6m/
X
š configparser.py
ā
X
š contextlib.py
ā
X
š copy.py
ā
X
š copyreg.py
ā
X
š crypt.py
ā
X
š csv.py
ā
X
š ctypes/
X
š curses/
X
š datetime.py
ā
X
š dbm/
X
š decimal.py
ā
X
š difflib.py
ā
X
š dis.py
ā
X
š distutils/
X
š doctest.py
ā
X
š dummy_threading.py
ā
X
š email/
X
š encodings/
X
š ensurepip/
X
š enum.py
ā
X
š filecmp.py
ā
X
š fileinput.py
ā
X
š fnmatch.py
ā
X
š formatter.py
ā
X
š fractions.py
ā
X
š ftplib.py
ā
X
š functools.py
ā
X
š genericpath.py
ā
X
š getopt.py
ā
X
š getpass.py
ā
X
š gettext.py
ā
X
š glob.py
ā
X
š gzip.py
ā
X
š hashlib.py
ā
X
š heapq.py
ā
X
š hmac.py
ā
X
š html/
X
š http/
X
š idlelib/
X
š imaplib.py
ā
X
š imghdr.py
ā
X
š imp.py
ā
X
š importlib/
X
š inspect.py
ā
X
š io.py
ā
X
š ipaddress.py
ā
X
š json/
X
š keyword.py
ā
X
š lib-dynload/
X
š lib2to3/
X
š linecache.py
ā
X
š locale.py
ā
X
š logging/
X
š lzma.py
ā
X
š macpath.py
ā
X
š macurl2path.py
ā
X
š mailbox.py
ā
X
š mailcap.py
ā
X
š mimetypes.py
ā
X
š modulefinder.py
ā
X
š multiprocessing/
X
š netrc.py
ā
X
š nntplib.py
ā
X
š ntpath.py
ā
X
š nturl2path.py
ā
X
š numbers.py
ā
X
š opcode.py
ā
X
š operator.py
ā
X
š optparse.py
ā
X
š os.py
ā
X
š pathlib.py
ā
X
š pdb.py
ā
X
š pickle.py
ā
X
š pickletools.py
ā
X
š pipes.py
ā
X
š pkgutil.py
ā
X
š platform.py
ā
X
š plistlib.py
ā
X
š poplib.py
ā
X
š posixpath.py
ā
X
š pprint.py
ā
X
š profile.py
ā
X
š pstats.py
ā
X
š pty.py
ā
X
š py_compile.py
ā
X
š pyclbr.py
ā
X
š pydoc.py
ā
X
š pydoc_data/
X
š queue.py
ā
X
š quopri.py
ā
X
š random.py
ā
X
š re.py
ā
X
š reprlib.py
ā
X
š rlcompleter.py
ā
X
š runpy.py
ā
X
š sched.py
ā
X
š secrets.py
ā
X
š selectors.py
ā
X
š shelve.py
ā
X
š shlex.py
ā
X
š shutil.py
ā
X
š signal.py
ā
X
š site-packages/
X
š site.py
ā
X
š smtpd.py
ā
X
š smtplib.py
ā
X
š sndhdr.py
ā
X
š socket.py
ā
X
š socketserver.py
ā
X
š sqlite3/
X
š sre_compile.py
ā
X
š sre_constants.py
ā
X
š sre_parse.py
ā
X
š ssl.py
ā
X
š stat.py
ā
X
š statistics.py
ā
X
š string.py
ā
X
š stringprep.py
ā
X
š struct.py
ā
X
š subprocess.py
ā
X
š sunau.py
ā
X
š symbol.py
ā
X
š symtable.py
ā
X
š sysconfig.py
ā
X
š tabnanny.py
ā
X
š tarfile.py
ā
X
š telnetlib.py
ā
X
š tempfile.py
ā
X
š test/
X
š textwrap.py
ā
X
š this.py
ā
X
š threading.py
ā
X
š timeit.py
ā
X
š token.py
ā
X
š tokenize.py
ā
X
š trace.py
ā
X
š traceback.py
ā
X
š tracemalloc.py
ā
X
š tty.py
ā
X
š types.py
ā
X
š typing.py
ā
X
š unittest/
X
š urllib/
X
š uu.py
ā
X
š uuid.py
ā
X
š venv/
X
š warnings.py
ā
X
š wave.py
ā
X
š weakref.py
ā
X
š webbrowser.py
ā
X
š wsgiref/
X
š xdrlib.py
ā
X
š xml/
X
š xmlrpc/
X
š zipapp.py
ā
X
š zipfile.py
ā
X
SAVING...
BERHASIL DIUBAH!
EDITING: cProfile.py
#! /opt/alt/python36/bin/python3.6 """Python interface for the 'lsprof' profiler. Compatible with the 'profile' module. """ __all__ = ["run", "runctx", "Profile"] import _lsprof import profile as _pyprofile # ____________________________________________________________ # Simple interface def run(statement, filename=None, sort=-1): return _pyprofile._Utils(Profile).run(statement, filename, sort) def runctx(statement, globals, locals, filename=None, sort=-1): return _pyprofile._Utils(Profile).runctx(statement, globals, locals, filename, sort) run.__doc__ = _pyprofile.run.__doc__ runctx.__doc__ = _pyprofile.runctx.__doc__ # ____________________________________________________________ class Profile(_lsprof.Profiler): """Profile(timer=None, timeunit=None, subcalls=True, builtins=True) Builds a profiler object using the specified timer function. The default timer is a fast built-in one based on real time. For custom timer functions returning integers, timeunit can be a float specifying a scale (i.e. how long each integer unit is, in seconds). """ # Most of the functionality is in the base class. # This subclass only adds convenient and backward-compatible methods. def print_stats(self, sort=-1): import pstats pstats.Stats(self).strip_dirs().sort_stats(sort).print_stats() def dump_stats(self, file): import marshal with open(file, 'wb') as f: self.create_stats() marshal.dump(self.stats, f) def create_stats(self): self.disable() self.snapshot_stats() def snapshot_stats(self): entries = self.getstats() self.stats = {} callersdicts = {} # call information for entry in entries: func = label(entry.code) nc = entry.callcount # ncalls column of pstats (before '/') cc = nc - entry.reccallcount # ncalls column of pstats (after '/') tt = entry.inlinetime # tottime column of pstats ct = entry.totaltime # cumtime column of pstats callers = {} callersdicts[id(entry.code)] = callers self.stats[func] = cc, nc, tt, ct, callers # subcall information for entry in entries: if entry.calls: func = label(entry.code) for subentry in entry.calls: try: callers = callersdicts[id(subentry.code)] except KeyError: continue nc = subentry.callcount cc = nc - subentry.reccallcount tt = subentry.inlinetime ct = subentry.totaltime if func in callers: prev = callers[func] nc += prev[0] cc += prev[1] tt += prev[2] ct += prev[3] callers[func] = nc, cc, tt, ct # The following two methods can be called by clients to use # a profiler to profile a statement, given as a string. def run(self, cmd): import __main__ dict = __main__.__dict__ return self.runctx(cmd, dict, dict) def runctx(self, cmd, globals, locals): self.enable() try: exec(cmd, globals, locals) finally: self.disable() return self # This method is more useful to profile a single function call. def runcall(self, func, *args, **kw): self.enable() try: return func(*args, **kw) finally: self.disable() # ____________________________________________________________ def label(code): if isinstance(code, str): return ('~', 0, code) # built-in functions ('~' sorts at the end) else: return (code.co_filename, code.co_firstlineno, code.co_name) # ____________________________________________________________ def main(): import os, sys, pstats from optparse import OptionParser usage = "cProfile.py [-o output_file_path] [-s sort] scriptfile [arg] ..." parser = OptionParser(usage=usage) parser.allow_interspersed_args = False parser.add_option('-o', '--outfile', dest="outfile", help="Save stats to <outfile>", default=None) parser.add_option('-s', '--sort', dest="sort", help="Sort order when printing to stdout, based on pstats.Stats class", default=-1, choices=sorted(pstats.Stats.sort_arg_dict_default)) if not sys.argv[1:]: parser.print_usage() sys.exit(2) (options, args) = parser.parse_args() sys.argv[:] = args if len(args) > 0: progname = args[0] sys.path.insert(0, os.path.dirname(progname)) with open(progname, 'rb') as fp: code = compile(fp.read(), progname, 'exec') globs = { '__file__': progname, '__name__': '__main__', '__package__': None, '__cached__': None, } runctx(code, globs, None, options.outfile, options.sort) else: parser.print_usage() return parser # When invoked as main program, invoke the profiler on a script if __name__ == '__main__': main()
SIMPAN PERUBAHAN