Changeset: a3a73a71d9f6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a3a73a71d9f6
Removed Files:
        clients/R/Makefile.ag
        clients/R/MonetDB.R/Makefile.ag
        clients/R/MonetDB.R/src/Makefile.ag
        clients/R/MonetDB.R/src/profiler-r.c
        clients/R/MonetDB.R/src/profiler.c
        clients/R/MonetDB.R/src/profiler.h
Modified Files:
        clients/Makefile.ag
        clients/mapiclient/Makefile.ag
        clients/mapiclient/mclient.c
Branch: Jul2015
Log Message:

Remove progress bar for now


diffs (truncated from 495 to 300 lines):

diff --git a/clients/Makefile.ag b/clients/Makefile.ag
--- a/clients/Makefile.ag
+++ b/clients/Makefile.ag
@@ -4,6 +4,6 @@
 #
 # Copyright 2008-2015 MonetDB B.V.
 
-SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php 
HAVE_RUBYGEM?ruby examples HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 
NATIVE_WIN32?NT R
+SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php 
HAVE_RUBYGEM?ruby examples HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 
NATIVE_WIN32?NT
 
 EXTRA_DIST_DIR = Tests
diff --git a/clients/R/Makefile.ag b/clients/R/Makefile.ag
deleted file mode 100644
--- a/clients/R/Makefile.ag
+++ /dev/null
@@ -1,9 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# Copyright 2008-2015 MonetDB B.V.
-
-SUBDIRS = MonetDB.R
-
-EXTRA_DIST_DIR = Tests
diff --git a/clients/R/MonetDB.R/Makefile.ag b/clients/R/MonetDB.R/Makefile.ag
deleted file mode 100644
--- a/clients/R/MonetDB.R/Makefile.ag
+++ /dev/null
@@ -1,9 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# Copyright 2008-2015 MonetDB B.V.
-
-SUBDIRS = src
-EXTRA_DIST = DESCRIPTION NAMESPACE NEWS
-EXTRA_DIST_DIR = R man
diff --git a/clients/R/MonetDB.R/src/Makefile.ag 
b/clients/R/MonetDB.R/src/Makefile.ag
deleted file mode 100644
--- a/clients/R/MonetDB.R/src/Makefile.ag
+++ /dev/null
@@ -1,7 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# Copyright 2008-2015 MonetDB B.V.
-
-EXTRA_DIST = Makevars.win mapisplit.c mapisplit.h mapisplit-r.c profiler.c 
profiler.h profiler-r.c
diff --git a/clients/R/MonetDB.R/src/profiler-r.c 
b/clients/R/MonetDB.R/src/profiler-r.c
deleted file mode 100644
--- a/clients/R/MonetDB.R/src/profiler-r.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <R.h>
-#include <Rdefines.h>
-
-#include "profiler.h"
-
-SEXP profiler_start_listen() {
-       SEXP port;
-       int pret;
-       port = NEW_INTEGER(1);
-       pret = profiler_start();
-       if (pret < 0) {
-               error("Failed to listen for UDP messages");
-       }
-       INTEGER_POINTER(port)[0] = pret;
-       return port;
-}
diff --git a/clients/R/MonetDB.R/src/profiler.c 
b/clients/R/MonetDB.R/src/profiler.c
deleted file mode 100644
--- a/clients/R/MonetDB.R/src/profiler.c
+++ /dev/null
@@ -1,301 +0,0 @@
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <stdio.h>
-#ifndef _MSC_VER
-#include <pthread.h>
-#endif
-#include <signal.h>
-#include <unistd.h>
-#include <math.h>
-#include <stdlib.h>
-
-#include <sys/types.h>
-#ifdef _MSC_VER
-#include <sys/timeb.h>
-typedef int ssize_t;
-#else
-#include <sys/fcntl.h>
-#include <sys/time.h>
-#endif
-
-#if defined(_MSC_VER) || defined(__WIN32__)
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#define HAVE_NL_LANGINFO       /* not on Windows, probably everywhere else */
-typedef int SOCKET;
-#define INVALID_SOCKET (-1)
-#define SOCKET_ERROR (-1)
-#endif
-
-#ifdef HAVE_NL_LANGINFO
-#include <langinfo.h>
-#endif
-
-#include "mapisplit.h"
-#include "profiler.h"
-
-// trace output format and columns
-#define TRACE_NCOLS 14
-#define TRACE_COL_QUERYID 2
-#define TRACE_COL_STATEFL 4
-#define TRACE_COL_MALSTMT 13
-#define TRACE_MAL_MAXPARAMS 3 // we don't need more than 3 params here
-
-// size of the progress bar in characters
-#define PROFILER_BARSYMB 60
-
-static SOCKET profiler_socket;
-#ifdef _MSC_VER
-static HANDLE profiler_pthread;
-#else
-static pthread_t profiler_pthread;
-#endif
-static int profiler_needcleanup = 0;
-static int profiler_armed = 0;
-
-static char* profiler_symb_query = "X";
-static char* profiler_symb_trans = "V";
-static char* profiler_symb_bfree = "_";
-static char* profiler_symb_bfull = "#";
-
-/* standalone MAL function call parser */
-void mal_statement_split(char* stmt, mal_statement *out, size_t maxparams) {
-       #define TRIM(str) \
-       while (str[0] == ' ' || str[0] == '"') str++; endPos = curPos - 1; \
-       while (stmt[endPos] == ' ' || stmt[endPos] == '"') { stmt[endPos] = 
'\0'; endPos--; }
-
-       size_t curPos, endPos, paramStart = 0, stmtLen;
-       mal_statement_state state = ASSIGNMENT;
-
-       out->assignment = stmt;
-       out->function = stmt;
-       out->nparams = 0;
-
-       stmtLen = strlen(stmt);
-       for (curPos = 0; curPos < stmtLen; curPos++) {
-               char chr = stmt[curPos];
-               switch (state) {
-               case ASSIGNMENT:
-                       if (chr == ':' && stmt[curPos+1] == '=') {
-                               stmt[curPos] = '\0';
-                               TRIM(out->assignment)
-                               state = FUNCTION;
-                               out->function = &stmt[curPos + 2];
-                       }
-                       break;
-               
-               case FUNCTION:
-                       if (chr == '(' || chr == ';') {
-                               stmt[curPos] = '\0';
-                               TRIM(out->function)
-                               state = PARAM;
-                               paramStart = curPos+1;
-                       }
-                       break;
-
-               case PARAM:
-                       if (chr == '"') {
-                               state = QUOTED;
-                       }
-                       if (chr == ',' || chr == ')') {
-                               stmt[curPos] = '\0';
-                               out->params[out->nparams] = &stmt[paramStart];
-                               TRIM(out->params[out->nparams])
-                               out->nparams++;
-                               if (out->nparams >= maxparams) {
-                                       return;
-                               }
-                               paramStart = curPos+1;
-                       }
-                       break;
-
-               case QUOTED:
-                       if (chr == '"') {
-                               state = PARAM;
-                               break;
-                       }
-                       if (chr == '\\') {
-                               state = ESCAPEDP;
-                               break;
-                       }
-                       break;
-
-               case ESCAPEDP:
-                       state = QUOTED;
-                       break;
-               }
-       }
-}
-
-static unsigned long profiler_tsms(void) {
-#ifdef _MSC_VER
-       struct _timeb tb;
-       _ftime_s(&tb);
-       return (unsigned long) tb.time * 1000 + (unsigned long) tb.millitm;
-#else
-       unsigned long ret = 0;
-       struct timeval tv;
-       gettimeofday(&tv, NULL);
-       ret += tv.tv_sec * 1000;
-       ret += tv.tv_usec / 1000;
-       return ret;
-#endif
-}
-
-// clear line and overwrite with spaces
-void profiler_clearbar(void) {
-       int bs;
-       if (!profiler_needcleanup) return;
-       for (bs=0; bs < PROFILER_BARSYMB + 3 + 6; bs++) printf("\b \b"); 
-       profiler_needcleanup = 0;
-}
-
-void profiler_renderbar(size_t state, size_t total, char *symbol) {
-       int bs;
-       unsigned short percentage, symbols;
-
-       profiler_clearbar();
-       profiler_needcleanup = 1;
-
-       percentage = (unsigned short) ceil((1.0 * 
-               state / total) * 100);
-       symbols = (unsigned short) (PROFILER_BARSYMB*(percentage/100.0));
-       
-       printf("%s ", symbol);
-       for (bs=0; bs < symbols; bs++) printf("%s", profiler_symb_bfull);
-       for (bs=0; bs < PROFILER_BARSYMB-symbols; bs++) printf("%s", 
profiler_symb_bfree); 
-       printf(" %3u%% ", (unsigned int) percentage);
-       fflush(NULL);
-}
-
-#ifdef _MSC_VER
-static DWORD WINAPI profiler_thread(LPVOID params)
-#else
-static void* profiler_thread(void* params)
-#endif
-{
-       char buf[BUFSIZ];
-       char* elems[TRACE_NCOLS];
-       // query ids are unlikely to be longer than BUFSIZ
-       char* thisqueryid = malloc(BUFSIZ); 
-       char* queryid     = malloc(BUFSIZ);
-
-       ssize_t recvd = 0;
-       size_t profiler_msgs_expect = 0;
-       size_t profiler_msgs_done = 0;
-
-       unsigned long profiler_querystart = 0;
-       char* stmtbuf = malloc(65507); // maximum size of an IPv4 UDP packet
-
-       mal_statement *stmt = malloc(sizeof(mal_statement));
-       stmt->params = malloc(TRACE_MAL_MAXPARAMS * sizeof(char*));
-
-       (void) params;
-       for(;;) {
-               recvd = recv(profiler_socket, buf, sizeof(buf), 0);
-               if (recvd == SOCKET_ERROR)
-                       return 0;
-               if (recvd > 0) {
-                       size_t i = 0, j = 0;
-                       char ib = 0;
-                       buf[recvd] = 0;
-                       if (buf[0]== '#') {
-                               continue;
-                       }
-                       mapi_line_split(buf, elems, TRACE_NCOLS);
-                       if (strncmp(elems[TRACE_COL_STATEFL], "done", 4) != 0) {
-                               continue;
-                       }
-                       // cleanup overloaded query identifier
-                       for (i = 0; i < strlen(elems[TRACE_COL_QUERYID]); i++) {
-                               if (elems[TRACE_COL_QUERYID][i] == '[') {ib = 
1; thisqueryid[j++] = '*'; }
-                               if (elems[TRACE_COL_QUERYID][i] == ']') {ib = 
0; continue;}
-                               if (!ib) thisqueryid[j++] = 
elems[TRACE_COL_QUERYID][i];
-                       }
-                       thisqueryid[j] = '\0';
-
-                       mapi_unescape(elems[TRACE_COL_MALSTMT], stmtbuf);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to