Skip to content

Commit

Permalink
Issue #56 Fix: saving of column states added on VS Pane closure
Browse files Browse the repository at this point in the history
- calibration iterations count rolled back.
  • Loading branch information
tyoma committed Apr 1, 2020
1 parent eaa2ab0 commit 92258d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion collector/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const size_t c_trace_limit = 5000000;
shared_ptr<thread_monitor> g_thread_monitor = create_thread_monitor(mt::get_thread_callbacks());
const shared_ptr<calls_collector> g_collector(new calls_collector(c_trace_limit, *g_thread_monitor));
extern "C" calls_collector *g_collector_ptr = g_collector.get();
const overhead c_overhead = calibrate_overhead(*g_collector_ptr, c_trace_limit / 100);
const overhead c_overhead = calibrate_overhead(*g_collector_ptr, c_trace_limit / 10);
collector_app g_profiler_app(&probe_create_channel, g_collector, c_overhead, g_thread_monitor);
const platform_initializer g_intializer(g_profiler_app);

Expand Down
10 changes: 6 additions & 4 deletions micro-profiler/visualstudio/vs-extension/vs-pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,20 @@ namespace micro_profiler

void close()
{
if (_hosted_ui)
_hosted_ui->save(*open_configuration());
_frame->CloseFrame(FRAMECLOSE_NoSave);
_frame.Release();
LOG(PREAMBLE "closed...") % A(this);
}

void set_model(const shared_ptr<functions_list> &model, const string &executable)
{
shared_ptr<tables_ui> ui(new tables_ui(model, *open_configuration()));

_hosted_ui.reset(new tables_ui(model, *open_configuration()));
_model = model;
_executable = executable;
_host->set_view(ui);
_open_source_connection = ui->open_source += bind(&vs_pane::on_open_source, this, _1, _2);
_host->set_view(_hosted_ui);
_open_source_connection = _hosted_ui->open_source += bind(&vs_pane::on_open_source, this, _1, _2);
_host->set_background_color(agge::color::make(24, 32, 48));
}

Expand Down Expand Up @@ -170,6 +171,7 @@ namespace micro_profiler
}

private:
shared_ptr<tables_ui> _hosted_ui;
shared_ptr<functions_list> _model;
string _executable;
shared_ptr<wpl::ui::view_host> _host;
Expand Down

0 comments on commit 92258d3

Please sign in to comment.