Remove now-unused 'resource' import
This commit is contained in:
parent
c1b077cd19
commit
93ebeb2aa8
|
@ -13,12 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Because otherwise 'resource' collides with synapse.metrics.resource
|
|
||||||
from __future__ import absolute_import
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
from resource import getrusage, RUSAGE_SELF
|
|
||||||
|
|
||||||
|
|
||||||
TICKS_PER_SEC = 100
|
TICKS_PER_SEC = 100
|
||||||
|
@ -49,7 +45,6 @@ STAT_FIELDS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rusage = None
|
|
||||||
stats = {}
|
stats = {}
|
||||||
fd_counts = None
|
fd_counts = None
|
||||||
|
|
||||||
|
@ -65,9 +60,6 @@ if HAVE_PROC_STAT:
|
||||||
|
|
||||||
|
|
||||||
def update_resource_metrics():
|
def update_resource_metrics():
|
||||||
global rusage
|
|
||||||
rusage = getrusage(RUSAGE_SELF)
|
|
||||||
|
|
||||||
if HAVE_PROC_SELF_STAT:
|
if HAVE_PROC_SELF_STAT:
|
||||||
global stats
|
global stats
|
||||||
with open("/proc/self/stat") as s:
|
with open("/proc/self/stat") as s:
|
||||||
|
|
Loading…
Reference in New Issue