Beispiel #1
0
 def test_hotshot_function_is_twenty(self):
     prof = p2h.Converter(twenty_hotprof_testdata_path)
     prof.printout('html', self.dirname)
     path = self.dirname + '/index.html'
     self.assertEqual(True, os.path.exists(path))
     path = self.dirname + '/index-all.html'
     self.assertEqual(False, os.path.exists(path))
Beispiel #2
0
import pyprof2html

# run profiling.py first
# this creates files in the stats directory

converter = pyprof2html.Converter("stats/profilestats.out")
converter._hookhtml()

# display html/index.html in web browser
import webbrowser, os
url = os.getcwd().replace('\\', '/')  # getcwd() returns slashes the wrong way round for a browser
url = "file:///" + url + "/html/index.html"
print(url)
webbrowser.open_new(url)

1
Beispiel #3
0
 def test_hotshotlinehtml(self):
     prof = p2h.Converter(hotshotline_testdata_path)
     prof.output_dir = self.dirname
     prof.printout('html')
     self.assertEqual(True, True)
Beispiel #4
0
 def test_hotshothtml(self):
     prof = p2h.Converter(hotshot_testdata_path)
     prof.printout('html', self.dirname)
     self.assertEqual(True, os.path.exists(self.dirname + '/index.html'))
Beispiel #5
0
 def test_profilehtml(self):
     prof = p2h.Converter(prof_testdata_path)
     prof.output_dir = self.dirname
     prof.printout('html', self.dirname)
     self.assertEqual(True, os.path.exists(self.dirname + '/index.html'))
Beispiel #6
0
 def test_hotshotraw(self):
     prof = p2h.Converter(hotshot_testdata_path)
     prof.printout('raw')
     self.assertEqual(True, True)
Beispiel #7
0
 def test_cprofraw(self):
     prof = p2h.Converter(cprof_testdata_path)
     prof.printout('raw')
     self.assertEqual(True, True)