Skip to content

Instantly share code, notes, and snippets.

@laserbat
Created July 30, 2011 08:53
Show Gist options
  • Save laserbat/1115348 to your computer and use it in GitHub Desktop.
Save laserbat/1115348 to your computer and use it in GitHub Desktop.
5293121 function calls (5220589 primitive calls) in 70.422 CPU seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.005 0.005 70.422 70.422 {execfile}
1 0.001 0.001 70.416 70.416 main.py:20(<module>)
1 1.012 1.012 58.785 58.785 Game.py:111(mainLoop)
267 0.022 0.000 51.445 0.193 Game.py:1291(playerTurn)
301 0.002 0.000 50.176 0.167 Unicurses.py:2312(getch)
301 0.002 0.000 50.175 0.167 Unicurses.py:1190(wgetch)
301 50.173 0.167 50.173 0.167 {built-in method getch}
268 0.006 0.000 39.199 0.146 IO.py:110(rkey)
1 1.863 1.863 11.604 11.604 Game.py:38(__init__)
23 0.000 0.000 10.094 0.439 IO.py:93(readkey)
203153 1.936 0.000 7.832 0.000 IO.py:73(printex)
2 0.002 0.001 6.951 3.475 Game.py:936(invMenu)
21 0.001 0.000 1.987 0.095 Game.py:2007(addMsg)
9 0.000 0.000 1.942 0.216 Game.py:566(askDirection)
126 1.017 0.008 1.932 0.015 Game.py:429(drawMap)
192000 1.085 0.000 1.795 0.000 Game.py:2188(flines)
192811 0.553 0.000 1.682 0.000 random.py:224(randint)
203153 0.540 0.000 1.595 0.000 Unicurses.py:2401(mvaddstr)
404970 1.058 0.000 1.571 0.000 Unicurses.py:942(color_pair)
113 0.001 0.000 1.547 0.014 Game.py:2030(calcFov)
113 0.001 0.000 1.408 0.012 MRPAS.py:82(calcfov)
113 0.527 0.005 1.407 0.012 MRPAS.py:239(computeFov)
217578 0.550 0.000 1.391 0.000 Unicurses.py:2300(attroff)
211528 0.526 0.000 1.358 0.000 Unicurses.py:2303(attron)
75077/7384 0.453 0.000 1.318 0.000 copy.py:144(deepcopy)
192811 0.906 0.000 1.128 0.000 random.py:160(randrange)
106/3 0.020 0.000 1.126 0.375 copy.py:224(_deepcopy_list)
203153 0.674 0.000 1.055 0.000 Unicurses.py:1596(mvwaddstr)
6085/6075 0.079 0.000 0.982 0.000 copy.py:277(_deepcopy_inst)
10 0.000 0.000 0.902 0.090 IO.py:129(frkey)
217578 0.563 0.000 0.841 0.000 Unicurses.py:818(wattroff)
211528 0.561 0.000 0.832 0.000 Unicurses.py:827(wattron)
6085/6075 0.099 0.000 0.708 0.000 copy.py:251(_deepcopy_dict)
1 0.000 0.000 0.704 0.704 Unicurses.py:2439(getstr)
1 0.000 0.000 0.704 0.704 Unicurses.py:1243(wgetstr)
1 0.704 0.704 0.704 0.704 {built-in method getstr}
15798/11088 0.189 0.000 0.543 0.000 Game.py:726(inLOS)
404970 0.514 0.000 0.514 0.000 {_curses.color_pair}
250529 0.474 0.000 0.474 0.000 MRPAS.py:88(getcell)
452 0.157 0.000 0.465 0.001 MRPAS.py:93(computeQuadrant)
417264 0.462 0.000 0.462 0.000 {abs}
203153 0.382 0.000 0.382 0.000 {built-in method addstr}
4710 0.190 0.000 0.320 0.000 Game.py:671(getLine)
192000 0.285 0.000 0.285 0.000 {math.sin}
217578 0.278 0.000 0.278 0.000 {built-in method attroff}
211528 0.272 0.000 0.272 0.000 {built-in method attron}
2 0.138 0.069 0.236 0.118 {cPickle.dump}
6153 0.113 0.000 0.232 0.000 copy.py:232(_deepcopy_tuple)
115934 0.224 0.000 0.224 0.000 {method 'keys' of 'dict' objects}
192829 0.222 0.000 0.222 0.000 {method 'random' of '_random.Random' objects}
1269 0.004 0.000 0.220 0.000 Unicurses.py:2324(refresh)
1269 0.005 0.000 0.215 0.000 Unicurses.py:1984(wrefresh)
113 0.212 0.002 0.212 0.002 Game.py:530(resetFov)
1269 0.210 0.000 0.210 0.000 {built-in method refresh}
25909 0.130 0.000 0.190 0.000 copy.py:261(_keep_alive)
1 0.000 0.000 0.159 0.159 Game.py:616(savegame)
130194 0.149 0.000 0.149 0.000 {method 'append' of 'list' objects}
126799 0.146 0.000 0.146 0.000 {id}
113 0.138 0.001 0.138 0.001 Game.py:2035(visibleCorners)
100986 0.126 0.000 0.126 0.000 {method 'get' of 'dict' objects}
114 0.006 0.000 0.101 0.001 Game.py:2191(drawUI)
2014 0.028 0.000 0.098 0.000 gzip.py:187(write)
1 0.000 0.000 0.079 0.079 Game.py:634(csave)
280 0.004 0.000 0.069 0.000 Game.py:2222(drawYou)
24342 0.061 0.000 0.061 0.000 {hasattr}
2 0.011 0.006 0.055 0.027 Level.py:54(generateLevel)
2014 0.053 0.000 0.053 0.000 {built-in method compress}
7258 0.036 0.000 0.046 0.000 MRPAS.py:69(setvis)
19855 0.039 0.000 0.039 0.000 {range}
2 0.006 0.003 0.037 0.018 Game.py:822(genItems)
109 0.001 0.000 0.033 0.000 Game.py:2021(messageStack)
6363 0.020 0.000 0.029 0.000 Game.py:2182(distance)
1 0.014 0.014 0.026 0.026 Game.py:18(<module>)
4 0.021 0.005 0.021 0.005 Game.py:2051(findCorners)
4 0.012 0.003 0.016 0.004 Game.py:788(floodFill)
12770 0.015 0.000 0.015 0.000 {len}
6085 0.011 0.000 0.011 0.000 {method 'update' of 'dict' objects}
5502 0.011 0.000 0.011 0.000 MRPAS.py:60(inCircle)
6364 0.010 0.000 0.010 0.000 {math.sqrt}
7480 0.009 0.000 0.009 0.000 copy.py:197(_deepcopy_atomic)
1 0.001 0.001 0.008 0.008 IO.py:17(<module>)
6085 0.007 0.000 0.007 0.000 {method 'iteritems' of 'dict' objects}
4585 0.007 0.000 0.007 0.000 Cell.py:61(char)
1 0.002 0.002 0.007 0.007 Unicurses.py:23(<module>)
3262 0.006 0.000 0.006 0.000 {max}
2962 0.005 0.000 0.005 0.000 Cell.py:54(__init__)
2034 0.005 0.000 0.005 0.000 {method 'write' of 'file' objects}
106 0.001 0.000 0.005 0.000 Dice.py:26(roll)
2016 0.005 0.000 0.005 0.000 {zlib.crc32}
3262 0.004 0.000 0.004 0.000 {min}
985 0.004 0.000 0.004 0.000 Game.py:805(flood)
5 0.004 0.001 0.004 0.001 Game.py:553(resetFlood)
303 0.001 0.000 0.004 0.000 Unicurses.py:910(cbreak)
1 0.002 0.002 0.003 0.003 __init__.py:4(<module>)
279 0.001 0.000 0.003 0.000 Unicurses.py:1807(nocbreak)
13 0.001 0.000 0.003 0.000 Level.py:46(hCorridor)
303 0.003 0.000 0.003 0.000 {_curses.cbreak}
301 0.001 0.000 0.002 0.000 Unicurses.py:2341(timeout)
1 0.000 0.000 0.002 0.002 IO.py:30(__init__)
1 0.002 0.002 0.002 0.002 Game.py:559(amnesia)
279 0.002 0.000 0.002 0.000 {_curses.nocbreak}
278 0.001 0.000 0.002 0.000 Unicurses.py:1287(halfdelay)
1 0.001 0.001 0.002 0.002 Dice.py:19(<module>)
13 0.002 0.000 0.002 0.000 Level.py:27(createRoom)
1 0.000 0.000 0.002 0.002 Unicurses.py:1395(initscr)
1 0.000 0.000 0.002 0.002 __init__.py:28(initscr)
301 0.001 0.000 0.002 0.000 Unicurses.py:2183(wtimeout)
283 0.001 0.000 0.001 0.000 Unicurses.py:1005(curs_set)
904 0.001 0.000 0.001 0.000 Cell.py:85(__init__)
1260 0.001 0.000 0.001 0.000 {method 'reverse' of 'list' objects}
12 0.000 0.000 0.001 0.000 Unicurses.py:2309(clear)
1 0.001 0.001 0.001 0.001 random.py:40(<module>)
12 0.000 0.000 0.001 0.000 Unicurses.py:969(wclear)
12 0.001 0.000 0.001 0.000 {built-in method clear}
1 0.001 0.001 0.001 0.001 __init__.py:11(<module>)
1 0.001 0.001 0.001 0.001 {_curses.initscr}
278 0.001 0.000 0.001 0.000 {_curses.halfdelay}
1 0.000 0.000 0.001 0.001 AStar.py:18(<module>)
2 0.000 0.000 0.001 0.000 gzip.py:308(close)
159 0.001 0.000 0.001 0.000 {chr}
1 0.001 0.001 0.001 0.001 heapq.py:31(<module>)
2 0.000 0.000 0.001 0.000 gzip.py:26(open)
2 0.000 0.000 0.001 0.000 gzip.py:44(__init__)
283 0.001 0.000 0.001 0.000 {_curses.curs_set}
301 0.001 0.000 0.001 0.000 {built-in method timeout}
13 0.000 0.000 0.001 0.000 Level.py:38(vCorridor)
1 0.001 0.001 0.001 0.001 gzip.py:4(<module>)
2 0.001 0.000 0.001 0.000 {built-in method flush}
280 0.000 0.000 0.000 0.000 You.py:62(char)
32 0.000 0.000 0.000 0.000 Unicurses.py:384(ALTCHAR)
1 0.000 0.000 0.000 0.000 panel.py:4(<module>)
1 0.000 0.000 0.000 0.000 Cell.py:18(<module>)
175 0.000 0.000 0.000 0.000 Level.py:175(intersect)
4 0.000 0.000 0.000 0.000 locale.py:499(setlocale)
1 0.000 0.000 0.000 0.000 Unicurses.py:2280(use_default_colors)
4 0.000 0.000 0.000 0.000 {_locale.setlocale}
1 0.000 0.000 0.000 0.000 {_curses.use_default_colors}
1 0.000 0.000 0.000 0.000 genericpath.py:26(isfile)
2 0.000 0.000 0.000 0.000 {open}
1 0.000 0.000 0.000 0.000 {posix.stat}
1 0.000 0.000 0.000 0.000 _endian.py:4(<module>)
2 0.000 0.000 0.000 0.000 gzip.py:133(_write_gzip_header)
4 0.000 0.000 0.000 0.000 Game.py:2139(stackInv)
14 0.000 0.000 0.000 0.000 __init__.py:147(_check_size)
2 0.000 0.000 0.000 0.000 {method 'close' of 'file' objects}
3 0.000 0.000 0.000 0.000 __init__.py:78(CFUNCTYPE)
3 0.000 0.000 0.000 0.000 Game.py:2095(rloot)
1 0.000 0.000 0.000 0.000 bisect.py:1(<module>)
2 0.000 0.000 0.000 0.000 {zlib.compressobj}
18 0.000 0.000 0.000 0.000 random.py:259(choice)
60 0.000 0.000 0.000 0.000 Level.py:164(__init__)
3 0.000 0.000 0.000 0.000 __init__.py:480(PYFUNCTYPE)
32 0.000 0.000 0.000 0.000 Unicurses.py:375(CCHAR)
1 0.000 0.000 0.000 0.000 random.py:90(__init__)
7 0.000 0.000 0.000 0.000 Cell.py:348(__init__)
62 0.000 0.000 0.000 0.000 Cell.py:134(char)
1 0.000 0.000 0.000 0.000 random.py:99(seed)
1 0.000 0.000 0.000 0.000 {_curses.setupterm}
45 0.000 0.000 0.000 0.000 {setattr}
2 0.000 0.000 0.000 0.000 {_ctypes.POINTER}
6 0.000 0.000 0.000 0.000 gzip.py:18(write32u)
10 0.000 0.000 0.000 0.000 Game.py:708(moveMob)
64 0.000 0.000 0.000 0.000 {ord}
1 0.000 0.000 0.000 0.000 Unicurses.py:2080(start_color)
40 0.000 0.000 0.000 0.000 Cell.py:99(char)
1 0.000 0.000 0.000 0.000 You.py:18(<module>)
1 0.000 0.000 0.000 0.000 __init__.py:45(start_color)
36 0.000 0.000 0.000 0.000 Cell.py:318(char)
1 0.000 0.000 0.000 0.000 os.py:747(urandom)
1 0.000 0.000 0.000 0.000 Unicurses.py:1512(keypad)
28 0.000 0.000 0.000 0.000 Level.py:170(center)
1 0.000 0.000 0.000 0.000 __init__.py:337(__init__)
1 0.000 0.000 0.000 0.000 Game.py:416(end)
12 0.000 0.000 0.000 0.000 Unicurses.py:1386(init_pair)
1 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects}
1 0.000 0.000 0.000 0.000 {built-in method keypad}
1 0.000 0.000 0.000 0.000 __future__.py:48(<module>)
18 0.000 0.000 0.000 0.000 {_struct.calcsize}
1 0.000 0.000 0.000 0.000 Level.py:18(<module>)
34 0.000 0.000 0.000 0.000 {_ctypes.sizeof}
12/6 0.000 0.000 0.000 0.000 Cell.py:358(__eq__)
2 0.000 0.000 0.000 0.000 gzip.py:126(_init_write)
1 0.000 0.000 0.000 0.000 Constants.py:18(<module>)
1 0.000 0.000 0.000 0.000 locale.py:544(getpreferredencoding)
1 0.000 0.000 0.000 0.000 MRPAS.py:43(<module>)
1 0.000 0.000 0.000 0.000 Unicurses.py:1125(endwin)
1 0.000 0.000 0.000 0.000 You.py:24(Player)
1 0.000 0.000 0.000 0.000 {_curses.endwin}
6 0.000 0.000 0.000 0.000 {_struct.pack}
1 0.000 0.000 0.000 0.000 Game.py:37(Game)
1 0.000 0.000 0.000 0.000 random.py:71(Random)
1 0.000 0.000 0.000 0.000 gzip.py:35(GzipFile)
8 0.000 0.000 0.000 0.000 Cell.py:305(__init__)
3 0.000 0.000 0.000 0.000 Unicurses.py:1825(noecho)
12 0.000 0.000 0.000 0.000 {_curses.init_pair}
1 0.000 0.000 0.000 0.000 You.py:21(__init__)
1 0.000 0.000 0.000 0.000 {posix.read}
6 0.000 0.000 0.000 0.000 Cell.py:315(close)
1 0.000 0.000 0.000 0.000 {function seed at 0x819841c}
1 0.000 0.000 0.000 0.000 {posix.open}
1 0.000 0.000 0.000 0.000 UserDict.py:57(get)
9 0.000 0.000 0.000 0.000 Dice.py:24(__init__)
7 0.000 0.000 0.000 0.000 __future__.py:75(__init__)
1 0.000 0.000 0.000 0.000 {math.exp}
1 0.000 0.000 0.000 0.000 Unicurses.py:1098(echo)
5 0.000 0.000 0.000 0.000 Cell.py:450(__init__)
1 0.000 0.000 0.000 0.000 wrapper.py:8(<module>)
6 0.000 0.000 0.000 0.000 Cell.py:330(char)
6 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
1 0.000 0.000 0.000 0.000 Cell.py:21(Cell)
1 0.000 0.000 0.000 0.000 {_curses.start_color}
1 0.000 0.000 0.000 0.000 {_ctypes.dlopen}
4 0.000 0.000 0.000 0.000 Cell.py:97(__init__)
1 0.000 0.000 0.000 0.000 {sys.exit}
3 0.000 0.000 0.000 0.000 Cell.py:375(__init__)
2 0.000 0.000 0.000 0.000 {time.time}
1 0.000 0.000 0.000 0.000 Cell.py:109(Mob)
1 0.000 0.000 0.000 0.000 Cell.py:333(item)
1 0.000 0.000 0.000 0.000 __init__.py:243(c_char_p)
3 0.000 0.000 0.000 0.000 Cell.py:408(__init__)
2 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
2 0.000 0.000 0.000 0.000 {math.log}
3 0.000 0.000 0.000 0.000 __init__.py:104(CFunctionType)
3 0.000 0.000 0.000 0.000 {_curses.noecho}
2 0.000 0.000 0.000 0.000 Level.py:24(__init__)
1 0.000 0.000 0.000 0.000 IO.py:28(IO)
3 0.000 0.000 0.000 0.000 __init__.py:481(CFunctionType)
1 0.000 0.000 0.000 0.000 random.py:643(WichmannHill)
1 0.000 0.000 0.000 0.000 Cell.py:242(Imp)
1 0.000 0.000 0.000 0.000 Cell.py:412(brokenstick)
1 0.000 0.000 0.000 0.000 {binascii.hexlify}
1 0.000 0.000 0.000 0.000 Cell.py:299(Door)
1 0.000 0.000 0.000 0.000 random.py:793(SystemRandom)
1 0.000 0.000 0.000 0.000 Cell.py:396(weapon)
1 0.000 0.000 0.000 0.000 Cell.py:364(armor)
2 0.000 0.000 0.000 0.000 gzip.py:323(__del__)
1 0.000 0.000 0.000 0.000 Cell.py:90(Stair)
1 0.000 0.000 0.000 0.000 __init__.py:159(py_object)
1 0.000 0.000 0.000 0.000 MRPAS.py:52(FOV)
2 0.000 0.000 0.000 0.000 __init__.py:417(__init__)
1 0.000 0.000 0.000 0.000 AStar.py:21(node)
1 0.000 0.000 0.000 0.000 Cell.py:454(Death)
1 0.000 0.000 0.000 0.000 Cell.py:263(Ant)
1 0.000 0.000 0.000 0.000 Cell.py:425(cutlass)
1 0.000 0.000 0.000 0.000 Cell.py:179(Ghost)
1 0.000 0.000 0.000 0.000 Cell.py:139(Newt)
1 0.000 0.000 0.000 0.000 Cell.py:200(Shade)
1 0.000 0.000 0.000 0.000 __init__.py:320(CDLL)
1 0.000 0.000 0.000 0.000 Cell.py:221(Demon)
1 0.000 0.000 0.000 0.000 Cell.py:160(Leprechaun)
1 0.000 0.000 0.000 0.000 {_ctypes.set_conversion_mode}
1 0.000 0.000 0.000 0.000 {posix.close}
1 0.000 0.000 0.000 0.000 Cell.py:324(secretDoor)
1 0.000 0.000 0.000 0.000 Cell.py:439(Boulder)
1 0.000 0.000 0.000 0.000 Cell.py:284(altar)
1 0.000 0.000 0.000 0.000 {_curses.echo}
1 0.000 0.000 0.000 0.000 __init__.py:17(<module>)
1 0.000 0.000 0.000 0.000 __init__.py:376(PyDLL)
1 0.000 0.000 0.000 0.000 UserDict.py:69(__contains__)
1 0.000 0.000 0.000 0.000 __init__.py:347(_FuncPtr)
1 0.000 0.000 0.000 0.000 Cell.py:79(permaRock)
1 0.000 0.000 0.000 0.000 Cell.py:388(rock)
1 0.000 0.000 0.000 0.000 Level.py:23(levGen)
1 0.000 0.000 0.000 0.000 __init__.py:201(c_double)
1 0.000 0.000 0.000 0.000 UserDict.py:17(__getitem__)
1 0.000 0.000 0.000 0.000 {method 'isalnum' of 'str' objects}
1 0.000 0.000 0.000 0.000 <string>:1(<module>)
1 0.000 0.000 0.000 0.000 __init__.py:205(c_longdouble)
1 0.000 0.000 0.000 0.000 __init__.py:233(c_byte)
1 0.000 0.000 0.000 0.000 __init__.py:278(c_wchar)
1 0.000 0.000 0.000 0.000 Level.py:162(Rect)
1 0.000 0.000 0.000 0.000 __init__.py:176(c_long)
1 0.000 0.000 0.000 0.000 Cell.py:104(move)
1 0.000 0.000 0.000 0.000 __init__.py:180(c_ulong)
1 0.000 0.000 0.000 0.000 MRPAS.py:53(__init__)
1 0.000 0.000 0.000 0.000 Cell.py:328(__init__)
1 0.000 0.000 0.000 0.000 You.py:59(__init__)
1 0.000 0.000 0.000 0.000 __init__.py:219(c_ulonglong)
1 0.000 0.000 0.000 0.000 __future__.py:74(_Feature)
1 0.000 0.000 0.000 0.000 {_locale.nl_langinfo}
1 0.000 0.000 0.000 0.000 _endian.py:22(_swapped_meta)
1 0.000 0.000 0.000 0.000 Cell.py:380(filthyrag)
1 0.000 0.000 0.000 0.000 Dice.py:23(die)
1 0.000 0.000 0.000 0.000 __init__.py:416(LibraryLoader)
1 0.000 0.000 0.000 0.000 _endian.py:45(BigEndianStructure)
1 0.000 0.000 0.000 0.000 {method 'fileno' of 'file' objects}
1 0.000 0.000 0.000 0.000 __init__.py:255(c_void_p)
1 0.000 0.000 0.000 0.000 __init__.py:226(c_ubyte)
1 0.000 0.000 0.000 0.000 __init__.py:260(c_bool)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 __init__.py:197(c_float)
1 0.000 0.000 0.000 0.000 __init__.py:275(c_wchar_p)
1 0.000 0.000 0.000 0.000 __init__.py:238(c_char)
1 0.000 0.000 0.000 0.000 IO.py:60(retSceen)
1 0.000 0.000 0.000 0.000 You.py:20(container)
1 0.000 0.000 0.000 0.000 __init__.py:215(c_longlong)
1 0.000 0.000 0.000 0.000 __init__.py:172(c_ushort)
1 0.000 0.000 0.000 0.000 __init__.py:168(c_short)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment