Mercurial > hg > audiodb
changeset 446:6ac898b19656 api-inversion
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.
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:56:45 +0000 |
parents | d1771f436ff7 |
children | b75c1e826058 |
files | audioDB.h index.cpp query.cpp |
diffstat | 3 files changed, 0 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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<PointPair, std::vector<PointPair>, std::less<PointPair> >* exact_evaluation_queue; - // Timers - struct timeval tv1; - struct timeval tv2; - // LISZT parameters unsigned lisztOffset; unsigned lisztLength;
--- 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);
--- 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;