@@ -593,11 +593,17 @@ unsigned long ADOutlierCOPOD::compute_outliers(Anomalies &outliers,
593593 std::vector<double > recon_p_runtimes = std::vector<double >(tot_runtimes, 0.0 );
594594 std::vector<double > recon_n_runtimes = std::vector<double >(tot_runtimes, 0.0 );
595595 int recon_idx = 0 ;
596+ // verboseStream << "Unwrapping Merged Histogram. Size: " << param[func_id].counts().size() << std::endl;
596597 for (int i=0 ; i < param[func_id].counts ().size (); i++){
597598 int count = param[func_id].counts ().at (i);
599+ // verboseStream << "Count: " << count << ", Value: " << param[func_id].bin_edges().at(i) << std::endl;
598600 for (int j=0 ; j<count; j++){
599- recon_p_runtimes.at (recon_idx++) = param[func_id].bin_edges ().at (i);
600- recon_n_runtimes.at (recon_idx++) = -1 * param[func_id].bin_edges ().at (i);
601+
602+ recon_p_runtimes.at (recon_idx) = param[func_id].bin_edges ().at (i);
603+ recon_n_runtimes.at (recon_idx) = -1 * param[func_id].bin_edges ().at (i);
604+ // verboseStream << "recon_p_runtimes.at(recon_idx): " << recon_p_runtimes.at(recon_idx) << ", recon_n_runtimes.at(recon_idx): " << recon_n_runtimes.at(recon_idx) << std::endl;
605+ // verboseStream << "recon_idx: " << recon_idx << std::endl;
606+ recon_idx++;
601607 }
602608 }
603609
@@ -666,7 +672,8 @@ unsigned long ADOutlierCOPOD::compute_outliers(Anomalies &outliers,
666672 const double runtime_i = this ->getStatisticValue (*itt); // runtimes.push_back(this->getStatisticValue(*itt));
667673 double ad_score;
668674
669- if (mean_pn_ecdf.at (running_idx++) > 0 )
675+ // verboseStream << "mean_pn_ecdf.at(running_idx++): " << mean_pn_ecdf.at(running_idx) << std::endl;
676+ if (mean_pn_ecdf.at (running_idx++) < 0.99 )
670677 ad_score = l_threshold + 1 ;
671678 else
672679 ad_score = l_threshold - 1 ;
@@ -678,7 +685,7 @@ unsigned long ADOutlierCOPOD::compute_outliers(Anomalies &outliers,
678685 if (ad_score >= l_threshold) {
679686
680687 itt->set_label (-1 );
681- std::cout << " !!!!!!!Detected outlier on func id " << func_id << " (" << itt->get_funcname () << " ) on thread " << itt->get_tid () << " runtime " << runtime_i << std::endl;
688+ verboseStream << " !!!!!!!Detected outlier on func id " << func_id << " (" << itt->get_funcname () << " ) on thread " << itt->get_tid () << " runtime " << runtime_i << std::endl;
682689 outliers.insert (itt, Anomalies::EventType::Outlier, runtime_i, ad_score, l_threshold); // insert into data structure containing captured anomalies
683690 n_outliers += 1 ;
684691
@@ -687,7 +694,7 @@ unsigned long ADOutlierCOPOD::compute_outliers(Anomalies &outliers,
687694 // Capture maximum of one normal execution per io step
688695 itt->set_label (1 );
689696 if (outliers.nFuncEvents (func_id, Anomalies::EventType::Normal) == 0 ) {
690- std::cout << " Detected normal event on func id " << func_id << " (" << itt->get_funcname () << " ) on thread " << itt->get_tid () << " runtime " << runtime_i << std::endl;
697+ verboseStream << " Detected normal event on func id " << func_id << " (" << itt->get_funcname () << " ) on thread " << itt->get_tid () << " runtime " << runtime_i << std::endl;
691698 outliers.insert (itt, Anomalies::EventType::Normal);
692699
693700 }
0 commit comments