Changeset: dc8b3edc944d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc8b3edc944d
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
monetdb5/modules/kernel/status.c
monetdb5/modules/kernel/status.mal
Branch: Apr2019
Log Message:
Merge with Aug2018 branch
diffs (148 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -11892,9 +11892,9 @@ Ready.
[ "sqlcatalog", "revoke_function", "pattern
sqlcatalog.revoke_function(sname:str, fcnid:int, grantee:str, privs:int,
grant:int, grantor:int):void ", "SQLrevoke_function;", "Catalog
operation revoke_function" ]
[ "sqlcatalog", "revoke_roles", "pattern
sqlcatalog.revoke_roles(sname:str, auth:str, grantor:int, admin:int):void ",
"SQLrevoke_roles;", "Catalog operation revoke_roles" ]
[ "status", "batStatistics", "command status.batStatistics()
(X_0:bat[:str], X_1:bat[:str]) ", "SYSgdkEnv;", "Show distribution of
bats by kind" ]
-[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:int]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
+[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
[ "status", "getThreads", "command status.getThreads() (X_0:bat[:int],
X_1:bat[:str]) ", "SYSgdkThread;", "Produce overview of active threads"
]
-[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:int]) ", "SYSioStatistics;", "Global IO activity
information" ]
+[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:lng]) ", "SYSioStatistics;", "Global IO activity
information" ]
[ "status", "memStatistics", "command status.memStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmemStatistics;", "Global memory
usage information" ]
[ "status", "memUsage", "command status.memUsage(minsize:lng)
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmem_usage;", "Get a split-up of
how much memory blocks are in use" ]
[ "status", "mem_cursize", "command status.mem_cursize():lng ",
"SYSgetmem_cursize;", "The amount of physical swapspace in KB that is
currently in use" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -16319,9 +16319,9 @@ Ready.
[ "sqlcatalog", "revoke_function", "pattern
sqlcatalog.revoke_function(sname:str, fcnid:int, grantee:str, privs:int,
grant:int, grantor:int):void ", "SQLrevoke_function;", "Catalog
operation revoke_function" ]
[ "sqlcatalog", "revoke_roles", "pattern
sqlcatalog.revoke_roles(sname:str, auth:str, grantor:int, admin:int):void ",
"SQLrevoke_roles;", "Catalog operation revoke_roles" ]
[ "status", "batStatistics", "command status.batStatistics()
(X_0:bat[:str], X_1:bat[:str]) ", "SYSgdkEnv;", "Show distribution of
bats by kind" ]
-[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:int]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
+[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
[ "status", "getThreads", "command status.getThreads() (X_0:bat[:int],
X_1:bat[:str]) ", "SYSgdkThread;", "Produce overview of active threads"
]
-[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:int]) ", "SYSioStatistics;", "Global IO activity
information" ]
+[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:lng]) ", "SYSioStatistics;", "Global IO activity
information" ]
[ "status", "memStatistics", "command status.memStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmemStatistics;", "Global memory
usage information" ]
[ "status", "memUsage", "command status.memUsage(minsize:lng)
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmem_usage;", "Get a split-up of
how much memory blocks are in use" ]
[ "status", "mem_cursize", "command status.mem_cursize():lng ",
"SYSgetmem_cursize;", "The amount of physical swapspace in KB that is
currently in use" ]
diff --git a/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
b/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
--- a/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
+++ b/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
@@ -2,9 +2,9 @@ import os
filename=os.path.join(os.getenv("TSTSRCDIR"), "tmpfile_1")
if os.path.isfile(filename):
- os.remove(filename);
+ os.remove(filename);
filename=os.path.join(os.getenv("TSTSRCDIR"), "tmpfile_2")
if os.path.isfile(filename):
- os.remove(filename);
+ os.remove(filename);
diff --git a/monetdb5/modules/kernel/status.c b/monetdb5/modules/kernel/status.c
--- a/monetdb5/modules/kernel/status.c
+++ b/monetdb5/modules/kernel/status.c
@@ -121,12 +121,12 @@ static struct tms state;
str
SYScpuStatistics(bat *ret, bat *ret2)
{
- int i;
+ lng i;
BAT *b, *bn;
#ifdef HAVE_TIMES
struct tms newst;
# ifndef HZ
- static int HZ;
+ static int HZ = 0;
if (HZ == 0) {
# if defined(HAVE_SYSCONF) && defined(_SC_CLK_TCK)
@@ -139,7 +139,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
#endif
bn = COLnew(0, TYPE_str, 32, TRANSIENT);
- b = COLnew(0, TYPE_int, 32, TRANSIENT);
+ b = COLnew(0, TYPE_lng, 32, TRANSIENT);
if (b == 0 || bn == 0){
if ( b) BBPunfix(b->batCacheid);
if ( bn) BBPunfix(bn->batCacheid);
@@ -152,7 +152,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
}
times(&newst);
/* store counters, ignore errors */
- i = (int) (time(0) - clk);
+ i = (lng) (time(0) - clk);
if (BUNappend(bn, "elapsed", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED)
goto bailout;
@@ -175,7 +175,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
state = newst;
#else
- i = int_nil;
+ i = lng_nil;
if (BUNappend(bn, "elapsed", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED ||
BUNappend(bn, "user", false) != GDK_SUCCEED ||
@@ -484,24 +484,24 @@ SYSvm_usage(bat *ret, bat *ret2, const l
str
SYSioStatistics(bat *ret, bat *ret2)
{
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
struct rusage ru;
#endif
- int i;
+ lng i;
BAT *b, *bn;
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
getrusage(RUSAGE_SELF, &ru);
#endif
bn = COLnew(0, TYPE_str, 32, TRANSIENT);
- b = COLnew(0, TYPE_int, 32, TRANSIENT);
+ b = COLnew(0, TYPE_lng, 32, TRANSIENT);
if (b == 0 || bn == 0) {
if ( b) BBPunfix(b->batCacheid);
if ( bn) BBPunfix(bn->batCacheid);
throw(MAL, "status.ioStatistics", SQLSTATE(HY001)
MAL_MALLOC_FAIL);
}
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
/* store counters, ignore errors */
i = ru.ru_maxrss;
if (BUNappend(bn, "maxrss", false) != GDK_SUCCEED ||
@@ -536,7 +536,7 @@ SYSioStatistics(bat *ret, bat *ret2)
BUNappend(b, &i, false) != GDK_SUCCEED)
goto bailout;
#else
- i = int_nil;
+ i = lng_nil;
if (BUNappend(bn, "maxrss", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED ||
BUNappend(bn, "minflt", false) != GDK_SUCCEED ||
diff --git a/monetdb5/modules/kernel/status.mal
b/monetdb5/modules/kernel/status.mal
--- a/monetdb5/modules/kernel/status.mal
+++ b/monetdb5/modules/kernel/status.mal
@@ -6,13 +6,13 @@
module status;
-command cpuStatistics()(:bat[:str],:bat[:int] )
+command cpuStatistics()(:bat[:str],:bat[:lng] )
address SYScpuStatistics
comment "Global cpu usage information";
command memStatistics() (:bat[:str],:bat[:lng] )
address SYSmemStatistics
comment "Global memory usage information";
-command ioStatistics()(:bat[:str],:bat[:int] )
+command ioStatistics()(:bat[:str],:bat[:lng] )
address SYSioStatistics
comment "Global IO activity information";
command vmStatistics(minsize:lng)(:bat[:str],:bat[:lng] )
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list