traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/core Peak.cpp


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/core Peak.cpp
Date: Mon, 15 Oct 2007 21:12:22 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/10/15 21:12:22

Modified files:
        src/core       : Peak.cpp 

Log message:
        * For those who love profiling, uncomment the PROFILE_START end 
PROFILE_END lines, and you get 'usefull' information on the command line :)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Peak.cpp?cvsroot=traverso&r1=1.64&r2=1.65

Patches:
Index: Peak.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Peak.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- Peak.cpp    15 Oct 2007 20:53:11 -0000      1.64
+++ Peak.cpp    15 Oct 2007 21:12:22 -0000      1.65
@@ -281,11 +281,7 @@
        
        ChannelData* data = m_channelData.at(chan);
        
-// #define profile
-
-#if defined (profile)
-       trav_time_t starttime = get_microseconds();
-#endif
+//     PROFILE_START;
        
        // Macro view mode
        if ( zoomLevel > MAX_ZOOM_USING_SOURCEFILE) {
@@ -307,10 +303,7 @@
                        PERROR("Could not read in all peak data, pixelcount is 
%d, read count is %d", pixelcount, read);
                }
                
-#if defined (profile)
-               int processtime = (int) (get_microseconds() - starttime);
-               printf("Process time: %d useconds\n\n", processtime);
-#endif
+//             PROFILE_END("Peak calculate_peaks");
 
                if (read == 0) {
                        return NO_PEAKDATA_FOUND;
@@ -369,10 +362,7 @@
                } while(count < pixelcount);
 
 
-#if defined (profile)
-               int processtime = (int) (get_microseconds() - starttime);
-               printf("Process time: %d useconds\n\n", processtime);
-#endif
+//             PROFILE_END("Peak calculate_peaks");            
                
                // Assign the supplied buffer to the 'real' peakdata buffer.
                *buffer = peakdata;
@@ -604,11 +594,8 @@
 {
        PENTER;
        
-#define profile
+// PROFILE_START;
 
-#if defined (profile)
-       trav_time_t starttime = get_microseconds();
-#endif
        int ret = -1;
        
        if (prepare_processing(m_source->get_file_rate()) < 0) {
@@ -678,10 +665,7 @@
        
 out:
         
-#if defined (profile)
-       long processtime = (long) (get_microseconds() - starttime);
-       printf("Process time: %d seconds\n\n", (int)(processtime/1000));
-#endif
+//     PROFILE_END("Peak create from scratch");
        
        m_source->set_output_rate(44100, true);
 
@@ -942,8 +926,9 @@
        int framesRead = 0;
        peak_data_t* readbuffer;
        
+//     PROFILE_START;
+       
        if (m_d->memory) {
-//             printf("using memory mapped read\n");
                readbuffer = (peak_data_t*)(m_d->memory + 
m_readPos*sizeof(peak_data_t));
                framesRead = count;
        } else {
@@ -955,6 +940,8 @@
                buffer->destination[0][f] = float(readbuffer[f]);
        }
 
+//     PROFILE_END("peakdata reader read");
+
        m_readPos += framesRead;
        
        return framesRead;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]