# HG changeset patch # User mas01cr # Date 1230116205 0 # Node ID 6ac898b1965670c4be23ddc5cf3a0e81e94e1e54 # Parent d1771f436ff714cacba264a9f91a411e69605647 Incrementally zapping bits of code. In this case, the timeval things that were used for timing the query loop. This functionality is trivially (haha, I said "trivially") replicable using LD_PRELOAD tricks or, alternatively, a profiler. diff -r d1771f436ff7 -r 6ac898b19656 audioDB.h --- a/audioDB.h Wed Dec 24 10:56:41 2008 +0000 +++ b/audioDB.h Wed Dec 24 10:56:45 2008 +0000 @@ -314,10 +314,6 @@ Accumulator *accumulator; priority_queue, std::less >* exact_evaluation_queue; - // Timers - struct timeval tv1; - struct timeval tv2; - // LISZT parameters unsigned lisztOffset; unsigned lisztLength; diff -r d1771f436ff7 -r 6ac898b19656 index.cpp --- a/index.cpp Wed Dec 24 10:56:41 2008 +0000 +++ b/index.cpp Wed Dec 24 10:56:45 2008 +0000 @@ -605,7 +605,6 @@ VERB_LOG(1, "retrieving tracks..."); - gettimeofday(&tv1, NULL); // query vector index Uns32T Nq = (qpointers.nvectors>O2_MAXTRACKLEN?O2_MAXTRACKLEN:qpointers.nvectors) - sequenceLength + 1; vv = index_initialize_shingles(Nq); // allocate memory to copy query vectors to shingles @@ -641,11 +640,6 @@ // Perform exact distance computation on point pairs in exact_evaluation_queue query_loop_points(spec, query, &qpointers); - gettimeofday(&tv2,NULL); - VERB_LOG(1,"elapsed time: %ld msec\n", - (tv2.tv_sec*1000 + tv2.tv_usec/1000) - - (tv1.tv_sec*1000 + tv1.tv_usec/1000)) - // Close the index file close(lshfid); diff -r d1771f436ff7 -r 6ac898b19656 query.cpp --- a/query.cpp Wed Dec 24 10:56:41 2008 +0000 +++ b/query.cpp Wed Dec 24 10:56:45 2008 +0000 @@ -715,8 +715,6 @@ error("failed to set up db"); } - VERB_LOG(1, "matching tracks..."); - unsigned j,k,track,trackOffset=0, HOP_SIZE=sequenceHop; unsigned wL = spec->qid.sequence_length; double **D = 0; // Differences query and target @@ -725,7 +723,6 @@ D = new double*[qpointers.nvectors]; // pre-allocate DD = new double*[qpointers.nvectors]; - gettimeofday(&tv1, NULL); unsigned processedTracks = 0; off_t trackIndexOffset; char nextKey[MAXSTR]; @@ -825,11 +822,6 @@ free(data_buffer); - gettimeofday(&tv2,NULL); - VERB_LOG(1,"elapsed time: %ld msec\n", - (tv2.tv_sec*1000 + tv2.tv_usec/1000) - - (tv1.tv_sec*1000 + tv1.tv_usec/1000)) - // Clean up if(query_data) delete[] query_data;