The server is Bono and starts 11 processes.
The total ingress settings for the start service cprofile
if __name__= ="__main__" :import cProfile Cprofile.run ('main ()','bono.profile')
Use the time in the command line to run
$ time Python xxx.py # # #
The service runs continuously, waits a few seconds, stops the service, displays on the command line: Analysis wait time is 16.793 (17.709-0.792-0.124), kernel run time is 0.124, user state run time 0.792
Real 0m17.709suser 0m0.792ssys 0m0.124s
Profiling a profile using Runsnake: Sort by local (this function does not include child functions)
The time.sleep is approximately 16.95 seconds, which is similar to the time command analysis, and the active sleep duration for the service.
Column name meaning: number of calls, relative number of calls, local execution time, average local execution time, total execution time, average execution, file name, row name, directory name
Click on the left side of the line, on the right side can show the function inside the call and spend time. The area is the time size.
A Python server program performance analysis