Changeset: 517e152e3ee9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/517e152e3ee9
Modified Files:
        monetdb5/mal/mal_client.c
        sql/backends/monet5/sql_scenario.c
Branch: sql_profiler
Log Message:

Init other Tbegin, Tend.


diffs (47 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -190,7 +190,7 @@ MCresetProfiler(stream *fdout)
 void
 MCexitClient(Client c)
 {
-       lng Tend = GDKusec();
+       lng Tend;
 
        MCresetProfiler(c->fdout);
        // Remove any left over constant symbols
@@ -209,6 +209,7 @@ MCexitClient(Client c)
                c->fdout = NULL;
                c->fdin = NULL;
        }
+       Tend = GDKusec();
        if(malProfileMode > 0)
                genericEvent("client_connection",
                                         (struct GenericEvent)
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -957,7 +957,8 @@ SQLparser(Client c)
        int pstatus = 0;
        int err = 0, opt, preparedid = -1;
        oid tag = 0;
-       lng Tbegin, Tend;
+       lng Tbegin = 0;
+       lng Tend = 0;
 
        c->query = NULL;
        be = (backend *) c->sqlcontext;
@@ -1128,11 +1129,12 @@ SQLparser(Client c)
         */
        be->q = NULL;
        c->query = query_cleaned(m->sa, QUERY(m->scanner));
+
        Tend = GDKusec();
        if(malProfileMode > 0) {
                str escaped_query = c->query? mal_quote(c->query, 
strlen(c->query)) : NULL;
                genericEvent("sql_parse",
-                                         (struct GenericEvent)
+                                        (struct GenericEvent)
                                         { &c->idx, &(c->curprg->def->tag), 
NULL, escaped_query, Tend-Tbegin, Tend, c->query? 0 : 1 });
                GDKfree(escaped_query);
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to