Skip to content
Snippets Groups Projects
Commit d1783c07 authored by Jean-Matthieu Etancelin's avatar Jean-Matthieu Etancelin Committed by Franck Pérignon
Browse files

profiler

parent f0dbc787
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,24 @@ class Profiler(object):
s = ""
return s
def write(self, with_head=True):
if main_rank == 0:
s = ""
h = "Rank"
for r in xrange(main_size):
s += "{0}".format(r)
for i in xrange(len(self.all_names)):
s += " {0}".format(self.all_times[i][r])
s += "\n"
s += "-1"
for i in xrange(len(self.all_names)):
h += ' ' + self.all_names[i]
s += " {0}".format(self.all_times[i][main_size])
h += "\n"
if with_head:
s = h + s
print s
def summarize(self):
from parmepy.fields.continuous import Field
self.summary = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment