# HG changeset patch # User mas01mc # Date 1220106804 0 # Node ID 8f11ea4d9cd2a437767e93b26c7cfd284a4e5aab # Parent 7ff56cce32978de78b0419dcc8c0b3b3f84f52b1 Added some extra logging to alert the user to which query is called diff -r 7ff56cce3297 -r 8f11ea4d9cd2 audioDB.cpp --- a/audioDB.cpp Sat Aug 30 13:41:50 2008 +0000 +++ b/audioDB.cpp Sat Aug 30 14:33:24 2008 +0000 @@ -57,10 +57,14 @@ else if(O2_ACTION(COM_QUERY)) if(isClient){ - if(query_from_key) + if(query_from_key){ + VERB_LOG(1, "Calling web services query %s on database %s, query=%s\n", radius>0?"(Radius)":"(NN)", dbName, strlen(key)?key:inFile); ws_query_by_key(dbName, key, inFile, (char*)hostport); - else + } + else{ + VERB_LOG(1, "Calling web services query on database %s, query=%s\n", dbName, strlen(key)?key:inFile); ws_query(dbName, inFile, (char*)hostport); + } } else query(dbName, inFile); diff -r 7ff56cce3297 -r 8f11ea4d9cd2 query.cpp --- a/query.cpp Sat Aug 30 13:41:50 2008 +0000 +++ b/query.cpp Sat Aug 30 14:33:24 2008 +0000 @@ -81,10 +81,14 @@ } // Test for index (again) here - if(radius && index_exists(dbName, radius, sequenceLength)) + if(radius && index_exists(dbName, radius, sequenceLength)){ + VERB_LOG(1, "Calling indexed query on database %s, radius=%f, sequenceLength=%d\n", dbName, radius, sequenceLength); index_query_loop(dbName, query_from_key_index); - else + } + else{ + VERB_LOG(1, "Calling brute-force query on database %s\n", dbName); query_loop(dbName, query_from_key_index); + } reporter->report(fileTable, adbQueryResponse); } diff -r 7ff56cce3297 -r 8f11ea4d9cd2 soap.cpp --- a/soap.cpp Sat Aug 30 13:41:50 2008 +0000 +++ b/soap.cpp Sat Aug 30 14:33:24 2008 +0000 @@ -32,7 +32,7 @@ void audioDB::ws_query(const char*dbName, const char *featureFileName, const char* hostport){ struct soap soap; adb__queryResponse adbQueryResponse; - + VERB_LOG(1, "Calling fileName query on database %s with featureFile=%s\n", dbName, featureFileName); soap_init(&soap); if(soap_call_adb__query(&soap,hostport,NULL, (char*)dbName,(char*)featureFileName,(char*)trackFileName,(char*)timesFileName, @@ -68,7 +68,8 @@ asqp.usingQueryPoint = usingQueryPoint; asqp.lsh_exact = lsh_exact; */ - + VERB_LOG(1, "Calling %s query on database %s with %s=%s\n", strlen(trackKey)?"KEY":"FILENAME", dbName, strlen(trackKey)?"KEY":"FILENAME", + strlen(trackKey)?trackKey:featureFileName); soap_init(&soap); if(queryType==O2_SEQUENCE_QUERY || queryType==O2_N_SEQUENCE_QUERY){ if(soap_call_adb__sequenceQueryByKey(&soap,hostport,NULL, @@ -119,6 +120,9 @@ // Literal translation of command line to web service int adb__query(struct soap* soap, xsd__string dbName, xsd__string qKey, xsd__string keyList, xsd__string timesFileName, xsd__int qType, xsd__int qPos, xsd__int pointNN, xsd__int trackNN, xsd__int seqLen, adb__queryResponse &adbQueryResponse){ char queryType[256]; + + fprintf(stderr,"Calling fileName query on database %s with featureFile=%s\n", dbName, qKey); + for(int k=0; k<256; k++) queryType[k]='\0'; if(qType == O2_POINT_QUERY) @@ -201,6 +205,9 @@ char absolute_thresholdStr[256]; char qtypeStr[256]; + fprintf(stderr, "Calling %s query on database %s with %s=%s\n", strlen(trackKey)?"KEY":"FILENAME", dbName, strlen(trackKey)?"KEY":"FILENAME", + strlen(trackKey)?trackKey:featureFileName); + /* When the branch is merged, move this to a header and use it elsewhere */ #define INTSTRINGIFY(val, str) \