1. from watermarker.marker import add_mark # 添加水印 add_mark(file=image_path,out=image_watermarked_path,mark=watermarked_text,color="#FFFFFFA0",opacity=0.3,angle=30,space=100,size=48)
cpuTime = stats[0] + stats[2]ifnow - self.__monitorLastStatsUpdate <10:return( now, cpuTime )# Send CPU consumption markself.__monitorLastStatsUpdate = now# Send Memory consumption markmembytes = MemStat.VmB('VmRSS:')ifmembytes: mem = membytes / (1024.*1024.) gMonitor.addMark('...
defexecute( self ):""" read requests from RequestClient and enqueue them into ProcessPool """gMonitor.addMark("Iteration",1)# # requests (and so tasks) countertaskCounter =0whiletaskCounter < self.__requestsPerCycle: self.log.debug("execute: executing %d request in this cycle"% taskCount...