Skip to content
Snippets Groups Projects
Commit 6b63af0e authored by Danny Auble's avatar Danny Auble
Browse files

BGQ - correct error ratio calculation

parent fea5bd62
No related branches found
No related tags found
No related merge requests found
...@@ -270,6 +270,8 @@ static void _handle_node_change(ba_mp_t *ba_mp, const std::string& cnode_loc, ...@@ -270,6 +270,8 @@ static void _handle_node_change(ba_mp_t *ba_mp, const std::string& cnode_loc,
continue; continue;
itr2 = list_iterator_create(bg_record->ba_mp_list); itr2 = list_iterator_create(bg_record->ba_mp_list);
while ((found_ba_mp = (ba_mp_t *)list_next(itr2))) { while ((found_ba_mp = (ba_mp_t *)list_next(itr2))) {
float err_ratio;
if (found_ba_mp->index != ba_mp->index) if (found_ba_mp->index != ba_mp->index)
continue; continue;
if (!found_ba_mp->used) if (!found_ba_mp->used)
...@@ -294,8 +296,10 @@ static void _handle_node_change(ba_mp_t *ba_mp, const std::string& cnode_loc, ...@@ -294,8 +296,10 @@ static void _handle_node_change(ba_mp_t *ba_mp, const std::string& cnode_loc,
bg_record->cnode_err_cnt--; bg_record->cnode_err_cnt--;
} }
bg_record->err_ratio = err_ratio = (float)bg_record->cnode_err_cnt
bg_record->cnode_err_cnt / bg_record->cnode_cnt; / (float)bg_record->cnode_cnt;
bg_record->err_ratio = err_ratio * 100;
/* handle really small ratios */ /* handle really small ratios */
if (!bg_record->err_ratio && bg_record->cnode_err_cnt) if (!bg_record->err_ratio && bg_record->cnode_err_cnt)
bg_record->err_ratio = 1; bg_record->err_ratio = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment