From 76120e1411591db60cfcf996bc640f6d5659867e Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Thu, 12 Apr 2018 09:24:54 +0200 Subject: [PATCH] Moving from Gb to Mb --- creolefuncs/mariadb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/creolefuncs/mariadb.py b/creolefuncs/mariadb.py index 39702a0..688e696 100644 --- a/creolefuncs/mariadb.py +++ b/creolefuncs/mariadb.py @@ -7,7 +7,7 @@ def getMemoryPercentage(percent): totalMemory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES') memoryToUse = (totalMemory*percent)/100 memoryMb = memoryToUse/(1024.**2) - return "{0}M".format(round(memoryMb,2)) + return "{0}M".format(int(memoryMb)) except: return "Error during memory percentage calculation"