Spruced up iostats and change to bool from custom

pull/58/head
FlightlessMango 4 years ago
parent 4847cb8e31
commit 534ca9416d

@ -1165,6 +1165,33 @@ static void compute_swapchain_display(struct swapchain_data *data)
i++;
}
}
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_read] || instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_write]){
auto sampling = instance_data->params.fps_sampling_period;
ImGui::TableNextRow();
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_read] && !instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_write])
ImGui::TextColored(ImVec4(0.643, 0.569, 0.827, 1.00f), "IO RD");
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_write] && !instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_read])
ImGui::TextColored(ImVec4(0.643, 0.569, 0.827, 1.00f), "IO RW");
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_read] && instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_write])
ImGui::TextColored(ImVec4(0.643, 0.569, 0.827, 1.00f), "IO RD/RW");
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_read]){
ImGui::TableNextCell();
ImGui::Text("%.2f", data->io.diff.read * (1000000 / sampling));
ImGui::SameLine(0,1.0f);
ImGui::PushFont(data->font1);
ImGui::Text("MiB/s");
ImGui::PopFont();
}
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_io_write]){
ImGui::TableNextCell();
ImGui::Text("%.2f", data->io.diff.write * (1000000 / sampling));
ImGui::SameLine(0,1.0f);
ImGui::PushFont(data->font1);
ImGui::Text("MiB/s");
ImGui::PopFont();
}
}
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_vram]){
ImGui::TableNextRow();
ImGui::TextColored(ImVec4(0.678, 0.392, 0.756, 1.00f), "VRAM");

@ -278,6 +278,8 @@ parse_overlay_config(struct overlay_params *params,
params->enabled[OVERLAY_PARAM_ENABLED_ram] = false;
params->enabled[OVERLAY_PARAM_ENABLED_vram] = false;
params->enabled[OVERLAY_PARAM_ENABLED_read_cfg] = false;
params->enabled[OVERLAY_PARAM_ENABLED_io_read] = false;
params->enabled[OVERLAY_PARAM_ENABLED_io_write] = false;
params->fps_sampling_period = 500000; /* 500ms */
params->width = 280;
params->height = 140;
@ -339,4 +341,10 @@ parse_overlay_config(struct overlay_params *params,
// Command buffer gets reused and timestamps cause hangs for some reason, force off for now
params->enabled[OVERLAY_PARAM_ENABLED_gpu_timing] = false;
if (!params->font_size)
params->font_size = 24;
//increase hud width if io read and write
if (params->enabled[OVERLAY_PARAM_ENABLED_io_read] && params->enabled[OVERLAY_PARAM_ENABLED_io_write])
params->width = 15 * params->font_size;
}

@ -52,6 +52,8 @@ extern "C" {
OVERLAY_PARAM_BOOL(time) \
OVERLAY_PARAM_BOOL(full) \
OVERLAY_PARAM_BOOL(read_cfg) \
OVERLAY_PARAM_BOOL(io_read) \
OVERLAY_PARAM_BOOL(io_write) \
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
OVERLAY_PARAM_CUSTOM(output_file) \
OVERLAY_PARAM_CUSTOM(position) \
@ -64,7 +66,7 @@ extern "C" {
OVERLAY_PARAM_CUSTOM(font_size) \
OVERLAY_PARAM_CUSTOM(toggle_hud) \
OVERLAY_PARAM_CUSTOM(toggle_logging) \
OVERLAY_PARAM_CUSTOM(refresh_config) \
OVERLAY_PARAM_CUSTOM(refresh_config) \
OVERLAY_PARAM_CUSTOM(crosshair_size) \
OVERLAY_PARAM_CUSTOM(offset_x) \
OVERLAY_PARAM_CUSTOM(offset_y) \

Loading…
Cancel
Save