Changeset: 90c1268459b0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90c1268459b0
Removed Files:
sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows
Modified Files:
monetdb5/modules/mal/Tests/All
monetdb5/optimizer/opt_pipes.c
sql/backends/monet5/datacell/actuator.c
sql/backends/monet5/datacell/basket.c
sql/backends/monet5/datacell/datacell.c
sql/backends/monet5/datacell/dcoperator.c
sql/backends/monet5/datacell/dcsocket.c
sql/backends/monet5/datacell/emitter.c
sql/backends/monet5/datacell/opt_datacell.c
sql/backends/monet5/datacell/petrinet.c
sql/backends/monet5/datacell/receptor.c
sql/backends/monet5/datacell/sensor.c
sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.SunOS
sql/test/BugTracker-2011/Tests/All
sql/test/testdb/Tests/All
testing/listexports.py.in
Branch: holindex
Log Message:
Merged from Jul2012
diffs (truncated from 4073 to 300 lines):
diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
--- a/monetdb5/modules/mal/Tests/All
+++ b/monetdb5/modules/mal/Tests/All
@@ -31,7 +31,7 @@ remoteInit
remote01
remote02
-remote03
+HAVE_GEOM?remote03
remote04
remote06
remote08
diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c
--- a/monetdb5/optimizer/opt_pipes.c
+++ b/monetdb5/optimizer/opt_pipes.c
@@ -397,31 +397,6 @@ struct PIPELINES {
"optimizer.garbageCollector();",
"experimental", "OPTcentipede", 0},
#endif
- {"datacell_pipe",
- "optimizer.inline();"
- "optimizer.remap();"
- "optimizer.datacell();"
- "optimizer.garbageCollector();"
- "optimizer.evaluate();"
- "optimizer.costModel();"
- "optimizer.coercions();"
- "optimizer.emptySet();"
- "optimizer.aliases();"
- "optimizer.mitosis();"
- "optimizer.mergetable();"
- "optimizer.deadcode();"
- "optimizer.commonTerms();"
- "optimizer.groups();"
- "optimizer.joinPath();"
- "optimizer.reorder();"
- "optimizer.deadcode();"
- "optimizer.reduce();"
- "optimizer.dataflow();"
- "optimizer.history();"
- "optimizer.multiplex();"
- "optimizer.accumulators();"
- "optimizer.garbageCollector();",
- "experimental", "OPTdatacell", 0},
/* The default + datacyclotron*/
{"datacyclotron_pipe",
"optimizer.inline();"
diff --git a/sql/backends/monet5/datacell/actuator.c
b/sql/backends/monet5/datacell/actuator.c
--- a/sql/backends/monet5/datacell/actuator.c
+++ b/sql/backends/monet5/datacell/actuator.c
@@ -19,10 +19,10 @@
/*
* @a M. Kersten, E. Liarou, R. Goncalves
-The Actuator Simulation program
+ The Actuator Simulation program
-This program listens to an event stream on a particular port.
-It collects statistics on the events.
+ This program listens to an event stream on a particular port.
+ It collects statistics on the events.
* @f actuator
*/
#ifndef ACTUATOR
@@ -68,7 +68,7 @@ static Actuator
ACnew(str nme)
{
Actuator ac;
- ac = (Actuator)GDKzalloc(sizeof(ACrecord));
+ ac = (Actuator) GDKzalloc(sizeof(ACrecord));
ac->name = GDKstrdup(nme);
ac->nxt = acAnchor;
acAnchor = ac;
@@ -84,25 +84,29 @@ static int protocol = TCP;
static int mode = PASSIVE;
/*
-The actuator.
-Events leave the Datacell to trigger actions in the real world. It may be as
simple
-as being displayed on a screen, upto and including calling the mergency
fighters
-by telephone. Since, the mapping from event message to real world action is
situation
-specific, the default provided here is to only show the event message.
+ The actuator. Events leave the Datacell to trigger actions in the
+ real world. It may be as simple as being displayed on a screen, upto
+ and including calling the mergency fighters by telephone. Since, the
+ mapping from event message to real world action is situation
+ specific, the default provided here is to only show the event
+ message.
-Users interested in experimentation with real actuators, can hook up the event
-stream with a SCADA system or directly send the events in a proper format to
-the channel where the actuators is listening.
+ Users interested in experimentation with real actuators, can hook up
+ the event stream with a SCADA system or directly send the events in a
+ proper format to the channel where the actuators is listening.
-The actuator runs in two modes, active or passive. In the former case, the tool
-contacts the server and establishes an UDF channel to pass CSV encoded event
strings.
-Optionally, the event can be tagged with a serial key and a time-stamp.
+ The actuator runs in two modes, active or passive. In the former
+ case, the tool contacts the server and establishes an UDF channel to
+ pass CSV encoded event strings. Optionally, the event can be tagged
+ with a serial key and a time-stamp.
-Events are generated using a built-in random number generator. They are sent
over the
-channel with an optional delay, expressed in number of microseconds.
+ Events are generated using a built-in random number generator. They
+ are sent over the channel with an optional delay, expressed in number
+ of microseconds.
-The code is relatively straightforward to extend to create your favoured dummy
sensor.
-*/
+ The code is relatively straightforward to extend to create your
+ favoured dummy sensor.
+ */
static void
usage(void)
{
@@ -114,8 +118,8 @@ usage(void)
mnstr_printf(ACout, "--port=<portnr>, default 50600 \n");
mnstr_printf(ACout, "--protocol=<name> either tcp/udp\n");
mnstr_printf(ACout, "--actuator=<actuator name> to identify the event
received \n");
- mnstr_printf(ACout, "--active run as a active listener \n");
- mnstr_printf(ACout, "--passive run as a passive listener (default)\n");
+ mnstr_printf(ACout, "--active run as a active listener \n");
+ mnstr_printf(ACout, "--passive run as a passive listener (default)\n");
mnstr_printf(ACout, "--events=<number> number of events to receive
(default -1)\n");
mnstr_printf(ACout, "--statistics=<number> show statistics after a
series of events\n");
exit(-1);
@@ -127,7 +131,7 @@ static char *actuator = "X";
static int trace = 1;
static int timestamp = 1; /* first column is a timestamp*/
-static int statistics = 0; /* dump statistics after a certain number
events */
+static int statistics = 0; /* dump statistics after a certain number events */
/*if(statistics!=0)
print statistics;
else don't
@@ -156,7 +160,8 @@ static void showStatistics(void)
{
double elaps;
int tuplesIntheBuffer = 2222;
- if (received == 0) return;
+ if (received == 0)
+ return;
@@ -164,8 +169,8 @@ static void showStatistics(void)
mnstr_printf(ACout, "Tuples in the buffer :%d\n", tuplesIntheBuffer);
mnstr_printf(ACout, "\nEvents %d\n", received);
- mnstr_printf(ACout, "Latency per tuple %6.2f microsec\n",
(((double)totallatency) / received) / tuplesIntheBuffer);
- elaps = (double)((receivedLast - sendFirst) * tuplesIntheBuffer /
(received));
+ mnstr_printf(ACout, "Latency per tuple %6.2f microsec\n", (((double)
totallatency) / received) / tuplesIntheBuffer);
+ elaps = (double) ((receivedLast - sendFirst) * tuplesIntheBuffer /
(received));
/*mnstr_printf(ACout, "receivedLast-sendFirst %d microsec\n",
receivedLast-sendFirst);*/
mnstr_printf(ACout, "Elapsed per batch %5.2f microsec\n", elaps);
mnstr_printf(ACout, "Throughput %8.2f tpl/sec\n", 1000000.0 / elaps *
tuplesIntheBuffer);
@@ -174,10 +179,10 @@ static void showStatistics(void)
/* send a short tuple to stderr for gnuplot datafile*/
fprintf(stderr, "events %d throughput %6.2f\n", received, 1000000.0 /
elaps * tuplesIntheBuffer);
- received=0;
- totallatency=0;
- receivedFirst= receivedLast=0;
- characters=0;
+ received = 0;
+ totallatency = 0;
+ receivedFirst = receivedLast = 0;
+ characters = 0;
}
static void terminate(Actuator ac)
@@ -191,7 +196,7 @@ static void terminate(Actuator ac)
static void stopListening(int i)
{
- (void)i;
+ (void) i;
signal(i, SIG_IGN);
if (statistics)
showStatistics();
@@ -225,13 +230,13 @@ main(int argc, char **argv)
{ "trace", 0, 0, 't' },
{ 0, 0, 0, 0 }
};
- THRdata[0] = (void *)file_wastream(stdout, "stdout");
- THRdata[1] = (void *)file_rastream(stdin, "stdin");
+ THRdata[0] = (void *) file_wastream(stdout, "stdout");
+ THRdata[1] = (void *) file_rastream(stdin, "stdin");
for (i = 0; i < THREADS; i++) {
GDKthreads[i].tid = i + 1;
}
- for (;; ) {
+ for (;;) {
/* int option_index=0;*/
int c = getopt_long(argc, argv, "a:c:p:s:S:b:h:?:t:0",
long_options, &option_index);
@@ -241,10 +246,9 @@ main(int argc, char **argv)
switch (c) {
case 't':
if (strcmp(long_options[option_index].name, "trace") ==
0) {
- trace = optarg? atol(optarg): 1;
- } else
- if (strcmp(long_options[option_index].name,
"timestamp") == 0) {
- timestamp = optarg? atol(optarg): 1;
+ trace = optarg ? atol(optarg) : 1;
+ } else if (strcmp(long_options[option_index].name,
"timestamp") == 0) {
+ timestamp = optarg ? atol(optarg) : 1;
} else {
usage();
exit(0);
@@ -252,7 +256,7 @@ main(int argc, char **argv)
break;
case 'e':
if (strcmp(long_options[option_index].name, "events")
== 0) {
- events = optarg? atol(optarg): 1;
+ events = optarg ? atol(optarg) : 1;
} else {
usage();
exit(0);
@@ -263,31 +267,29 @@ main(int argc, char **argv)
mode = ACTIVE;
break;
} else
- actuator = optarg? optarg: "dummy";
+ actuator = optarg ? optarg : "dummy";
break;
case 'p':
if (strcmp(long_options[option_index].name, "port") ==
0) {
- port = optarg? atol(optarg): -1;
+ port = optarg ? atol(optarg) : -1;
break;
- } else
- if (strcmp(long_options[option_index].name, "passive")
== 0) {
+ } else if (strcmp(long_options[option_index].name,
"passive") == 0) {
mode = PASSIVE;
break;
- } else
- if (strcmp(long_options[option_index].name, "protocol")
== 0) {
- if (strcmp(optarg, "TCP") == 0 || strcmp(optarg, "tcp") == 0) {
- protocol = TCP;
- break;
- }
- if (strcmp(optarg, "UDP") == 0 || strcmp(optarg, "udp") == 0) {
- protocol = UDP;
- break;
- }
+ } else if (strcmp(long_options[option_index].name,
"protocol") == 0) {
+ if (strcmp(optarg, "TCP") == 0 ||
strcmp(optarg, "tcp") == 0) {
+ protocol = TCP;
+ break;
+ }
+ if (strcmp(optarg, "UDP") == 0 ||
strcmp(optarg, "udp") == 0) {
+ protocol = UDP;
+ break;
+ }
}
break;
case 's':
if (strcmp(long_options[option_index].name,
"statistics") == 0) {
- statistics = optarg? atol(optarg): 100;
+ statistics = optarg ? atol(optarg) : 100;
break;
} else {
usage();
@@ -322,39 +324,39 @@ main(int argc, char **argv)
mnstr_printf(ACout, "--events=%d\n", events);
mnstr_printf(ACout, "--timestamp=%d\n", timestamp);
mnstr_printf(ACout, "--statistics=%d\n", statistics);
- mnstr_printf(ACout, "--%s\n", mode ==
ACTIVE?"active":"passive");
+ mnstr_printf(ACout, "--%s\n", mode == ACTIVE ? "active" :
"passive");
}
- strncpy(hostname,host,1024);
- if ( strcmp(host,"localhost")== 0 )
- gethostname(hostname,1024);
- host= hostname;
+ strncpy(hostname, host, 1024);
+ if (strcmp(host, "localhost") == 0)
+ gethostname(hostname, 1024);
+ host = hostname;
ac = ACnew(actuator);
/*name[0] = 0;*/
err = NULL;
- if ( mode == PASSIVE) {
+ if (mode == PASSIVE) {
ac->fromServer = udp_rastream(host, port, actuator);
- if ( ac->fromServer == 0){
- mnstr_printf(ACout, "Failed to access stream
%s:%d\n",host,port);
+ if (ac->fromServer == 0) {
+ mnstr_printf(ACout, "Failed to access stream %s:%d\n",
host, port);
return 0;
}
consumeStream(ac);
#ifdef _DEBUG_ACTUATOR_
- mnstr_printf(ACout, "stream consumed\n");
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list