Send residential memory usage to spectrum server

This commit is contained in:
moyamo 2016-01-10 00:02:19 +02:00
parent 80e7fad07f
commit 502077dc51

View file

@ -6,6 +6,8 @@ import os
import logging
import google.protobuf
import resource
def WRAP(MESSAGE, TYPE):
wrap = protocol_pb2.WrapperMessage()
wrap.type = TYPE
@ -620,7 +622,7 @@ class SpectrumBackend:
pass
def handleMemoryUsage(self):
return (0,0)
return (resource.getrusage(resource.RUSAGE_SELF).ru_maxrss, 0)
def handleExitRequest(self):
sys.exit(1)