| 215 | profile_f.close() |
| 216 | |
| 217 | def _write(self): |
| 218 | print("Writing profile file %s" % self.fname) |
| 219 | profile_f = open(self.fname, "w") |
| 220 | profile_f.write(self._header()) |
| 221 | for test_key in sorted(self.data): |
| 222 | per_fn = self.data[test_key] |
| 223 | profile_f.write("\n# TEST: %s\n\n" % test_key) |
| 224 | for platform_key in sorted(per_fn): |
| 225 | per_platform = per_fn[platform_key] |
| 226 | c = ",".join(str(count) for count in per_platform["counts"]) |
| 227 | profile_f.write("%s %s %s\n" % (test_key, platform_key, c)) |
| 228 | profile_f.close() |
| 229 | |
| 230 | |
| 231 | def function_call_count(variance=0.05, times=1, warmup=0): |