Changeset 3565

Show
Ignore:
Timestamp:
04/27/08 20:17:27 (7 months ago)
Author:
coderanger
Message:

Group output lines that occur within 1e-2 seconds.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tracforgeplugin/0.11/tracforge/admin/admin.py

    r3549 r3565  
    9494        cursor.execute('SELECT ts, action, step_direction, stream, data FROM tracforge_project_output WHERE project=%s ORDER BY ts, stream DESC', (data['project'],)) 
    9595        for ts, action, step_direction, stream, msg in cursor: 
    96             action_map[action, step_direction]['output'].append((float(ts), stream, msg)) 
     96            ts = float(ts) 
     97            output = action_map[action, step_direction]['output'] 
     98            if output and abs(output[-1][0] - ts) <= 1e-2 and output[-1][1] == stream: 
     99                output[-1] = (output[-1][0], output[-1][1], output[-1][2]+msg) 
     100            else:  
     101                output.append((float(ts), stream, msg)) 
    97102         
    98103        return 'admin_tracforge_project.html', data