Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KADichev authored and KADichev committed Oct 30, 2018
2 parents 69fd2f1 + 331c1e7 commit c0e8145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/monitor_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace allscale { namespace components {
, min_process_task(0)
, max_process_task(0)
, finished_tasks(0)
, sampling_interval_ms(2000)
, sampling_interval_ms(1000)
// , metric_sampler_(
// hpx::util::bind(
// &monitor::sample_node,
Expand Down
6 changes: 4 additions & 2 deletions src/dashboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ namespace allscale { namespace dashboard
float frequency = components::util::hardware_reconf::get_kernel_freq(0);
float max_frequency = frequency;//components::util::hardware_reconf::get_frequencies(0).back();;
#else
float frequency = 1.f;
float max_frequency = 1.f;
float frequency = monitor_c->get_current_freq(0);
float max_frequency = monitor_c->get_max_freq(0);
#endif
std::size_t active_cores = scheduler::get().get_active_threads();

std::size_t used_cycles = (1.f - state.idle_rate) * active_cores * frequency;
std::size_t avail_cycles = active_cores * frequency;
std::size_t max_cycles = active_cores * max_frequency;

state.productive_cycles_per_second = frequency * 1000 * (1.f - state.idle_rate); // freq to Hz

state.efficiency = used_cycles / float(max_cycles);
state.speed = used_cycles / float(avail_cycles);

Expand Down

0 comments on commit c0e8145

Please sign in to comment.