# HG changeset patch # User Jacob Dawid # Date 1343481477 -7200 # Node ID 7c14e3e6fc6b61a3cfecfea41b15c9e2820569a9 # Parent de3a318128f2defc46f60a82b093eb6317a05601 Update qterminal thanks to Jen. Removed performance information on events. * main-window.cc: Removed timer updating performance information. * main-window.h: Removed timer. * octave-link.cc: Removed code that collects performance information. * octave-link.h: Removed performance information struct. diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,2 +1,2 @@ 33f823397dbb0edb57503f2f6dad2362456bc6a9 gnulib -186cf3960cfa0c2752b77eba18af24cd0853c12a gui/qterminal +f91e00f96bc29f7f6395f08c828e09599f945511 gui/qterminal diff --git a/gui/src/main-window.cc b/gui/src/main-window.cc --- a/gui/src/main-window.cc +++ b/gui/src/main-window.cc @@ -368,25 +368,6 @@ } void -main_window::update_performance_information () -{ - octave_link::performance_information p - = octave_link::instance ()->get_performance_information (); - - int generate_events_msec - = (p.generate_events_stop - p.generate_events_start) * 1000 / CLOCKS_PER_SEC; - - int process_events_msec - = (p.process_events_stop - p.process_events_start) * 1000 / CLOCKS_PER_SEC; - - _status_bar->showMessage - (QString ("CPU time of the GUI in octave thread - generating rx events: ~%1 ms - processing tx events: ~%2 ms (%3 events)") - .arg (generate_events_msec) - .arg (process_events_msec) - .arg (p.event_queue_size)); -} - -void main_window::show_about_octave () { QString message = @@ -803,11 +784,5 @@ SIGNAL (quit_debug_mode_signal ()), this, SLOT (handle_quit_debug_mode ())); - - _update_performance_information_timer.setInterval (500); - _update_performance_information_timer.setSingleShot (false); - connect (&_update_performance_information_timer, SIGNAL (timeout ()), - this, SLOT (update_performance_information ())); - _update_performance_information_timer.start (); } diff --git a/gui/src/main-window.h b/gui/src/main-window.h --- a/gui/src/main-window.h +++ b/gui/src/main-window.h @@ -30,7 +30,6 @@ #include #include #include -#include // Editor includes #include "file-editor-interface.h" @@ -108,8 +107,6 @@ void debug_step_out (); void debug_quit (); - void update_performance_information (); - protected: void closeEvent (QCloseEvent * closeEvent); void read_settings (); @@ -122,7 +119,6 @@ QTerminal * _terminal; file_editor_interface * _file_editor; QMenu * _debug_menu; - QTimer _update_performance_information_timer; QAction * _debug_continue; QAction * _debug_step_into; diff --git a/gui/src/octave-adapter/octave-link.cc b/gui/src/octave-adapter/octave-link.cc --- a/gui/src/octave-adapter/octave-link.cc +++ b/gui/src/octave-adapter/octave-link.cc @@ -38,7 +38,6 @@ octave_link::octave_link () { _event_queue_mutex = new octave_mutex (); - _performance_information_mutex = new octave_mutex (); _last_working_directory = ""; _debugging_mode_active = false; } @@ -66,7 +65,6 @@ void octave_link::generate_events () { - _next_performance_information.generate_events_start = clock (); std::string current_working_directory = octave_env::get_current_directory (); if (current_working_directory != _last_working_directory) { @@ -87,15 +85,12 @@ _octave_event_listener->quit_debug_mode (); } } - _next_performance_information.generate_events_stop = clock (); } void octave_link::process_events () { - _next_performance_information.process_events_start = clock (); _event_queue_mutex->lock (); - _next_performance_information.event_queue_size = _event_queue.size (); while (_event_queue.size () > 0) { @@ -107,7 +102,6 @@ e->reject (); } _event_queue_mutex->unlock (); - _next_performance_information.process_events_stop = clock (); } void @@ -149,19 +143,6 @@ void octave_link::finished_readline_hook () { - _performance_information_mutex->lock (); - _performance_information = _next_performance_information; - _performance_information_mutex->unlock (); -} - -octave_link::performance_information -octave_link::get_performance_information () -{ - performance_information p; - _performance_information_mutex->lock (); - p = _performance_information; - _performance_information_mutex->unlock (); - return p; } std::string diff --git a/gui/src/octave-adapter/octave-link.h b/gui/src/octave-adapter/octave-link.h --- a/gui/src/octave-adapter/octave-link.h +++ b/gui/src/octave-adapter/octave-link.h @@ -82,15 +82,6 @@ /** Provides a way to access the unique octave_link object. */ static octave_link * instance () { return &_singleton; } - typedef struct - { - clock_t generate_events_start; - clock_t generate_events_stop; - clock_t process_events_start; - clock_t process_events_stop; - int event_queue_size; - } performance_information; - /** Starts octave. */ void launch_octave (); void register_event_listener (octave_event_listener *oel); @@ -105,7 +96,6 @@ void entered_readline_hook (); void finished_readline_hook (); - performance_information get_performance_information (); std::string get_last_working_directory (); @@ -132,10 +122,6 @@ /** Semaphore to lock access to the performance information. */ octave_mutex *_performance_information_mutex; - /** Stores performance data. */ - performance_information _next_performance_information; - performance_information _performance_information; - /** Unique instance. Singelton! */ static octave_link _singleton; };