mercurial/statprof.py
changeset 38197 aac4be30e250
parent 35420 c8e8e14a5ee9
child 38271 af402c6b90db
equal deleted inserted replaced
38196:b39958d6b81b 38197:aac4be30e250
   110 import inspect
   110 import inspect
   111 import json
   111 import json
   112 import os
   112 import os
   113 import signal
   113 import signal
   114 import sys
   114 import sys
   115 import tempfile
       
   116 import threading
   115 import threading
   117 import time
   116 import time
   118 
   117 
   119 from . import (
   118 from . import (
   120     encoding,
   119     encoding,
   689         print("error: missing %s" % scriptpath, file=fp)
   688         print("error: missing %s" % scriptpath, file=fp)
   690         print("get it here: https://github.com/brendangregg/FlameGraph",
   689         print("get it here: https://github.com/brendangregg/FlameGraph",
   691               file=fp)
   690               file=fp)
   692         return
   691         return
   693 
   692 
   694     fd, path = tempfile.mkstemp()
   693     fd, path = pycompat.mkstemp()
   695 
   694 
   696     file = open(path, "w+")
   695     file = open(path, "w+")
   697 
   696 
   698     lines = {}
   697     lines = {}
   699     for sample in data.samples:
   698     for sample in data.samples: