| 172 | } |
| 173 | |
| 174 | Json::Value FuzzGenReporter::exportStatsJson() const { |
| 175 | Json::Value RetJson; |
| 176 | size_t UTCountNotAnalyzed = getUTList(UNINITIALIZED).size(); |
| 177 | size_t UTCountNoInput = getUTList(NOT_FUZZABLE_NO_INPUT).size(); |
| 178 | size_t UTCountUnidentified = getUTList(NOT_FUZZABLE_UNIDENTIFIED).size(); |
| 179 | size_t UTCountFuzzSrcNotGenerated = |
| 180 | getUTList(FUZZABLE_SRC_NOT_GENERATED).size(); |
| 181 | size_t UTCountFuzzSrcGenerated = getUTList(FUZZABLE_SRC_GENERATED).size(); |
| 182 | size_t UTCountNotFuzzable = |
| 183 | UTCountNotAnalyzed + UTCountNoInput + UTCountUnidentified; |
| 184 | size_t UTCountFuzzable = UTCountFuzzSrcNotGenerated + UTCountFuzzSrcGenerated; |
| 185 | size_t UTCountTotal = UTCountNotFuzzable + UTCountFuzzable; |
| 186 | |
| 187 | RetJson["UTCount_Total"] = UTCountTotal; |
| 188 | RetJson["UTCount_NoCallSequence"] = UTCountNotAnalyzed; |
| 189 | RetJson["UTCount_NoInputParam"] = UTCountNoInput; |
| 190 | RetJson["UTCount_UnidentifiedParam"] = UTCountUnidentified; |
| 191 | RetJson["UTCount_FuzzSrcNotGenerated"] = UTCountFuzzSrcNotGenerated; |
| 192 | RetJson["UTCount_FuzzSrcGenerated"] = UTCountFuzzSrcGenerated; |
| 193 | RetJson["UTCount_NotFuzzable"] = UTCountNotFuzzable; |
| 194 | RetJson["UTCount_Fuzzable"] = UTCountFuzzable; |
| 195 | |
| 196 | size_t APICountInputParamNotInUT = getAPIList(UNINITIALIZED).size(); |
| 197 | size_t APICountNoInputParam = getAPIList(NOT_FUZZABLE_NO_INPUT).size(); |
| 198 | size_t APICountUnidentifiedParam = |
| 199 | getAPIList(NOT_FUZZABLE_UNIDENTIFIED).size(); |
| 200 | size_t APICountFuzzSrcNotGenerated = |
| 201 | getAPIList(FUZZABLE_SRC_NOT_GENERATED).size(); |
| 202 | size_t APICountFuzzSrcGenerated = getAPIList(FUZZABLE_SRC_GENERATED).size(); |
| 203 | size_t APICountNotFuzzable = APICountInputParamNotInUT + |
| 204 | APICountNoInputParam + APICountUnidentifiedParam; |
| 205 | size_t APICountFuzzable = |
| 206 | APICountFuzzSrcNotGenerated + APICountFuzzSrcGenerated; |
| 207 | size_t APICountTotal = APICountNotFuzzable + APICountFuzzable; |
| 208 | |
| 209 | size_t APICountUTAnalyzed = 0; |
| 210 | for (auto APIReport : this->APIReportMap) { |
| 211 | if (APIReport.second->HasUT) { |
| 212 | APICountUTAnalyzed++; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | RetJson["APICount_Total"] = APICountTotal; |
| 217 | RetJson["APICount_NoUT"] = APICountInputParamNotInUT; |
| 218 | RetJson["APICount_NoInputParam"] = APICountNoInputParam; |
| 219 | RetJson["APICount_UnidentifiedParam"] = APICountUnidentifiedParam; |
| 220 | RetJson["APICount_FuzzSrcNotGenerated"] = APICountFuzzSrcNotGenerated; |
| 221 | RetJson["APICount_FuzzSrcGenerated"] = APICountFuzzSrcGenerated; |
| 222 | RetJson["APICount_NotFuzzable"] = APICountNotFuzzable; |
| 223 | RetJson["APICount_Fuzzable"] = APICountFuzzable; |
| 224 | RetJson["APICount_InCallSequence"] = APICountUTAnalyzed; |
| 225 | |
| 226 | // To be updated by FTG Helper |
| 227 | RetJson["UTCount_FuzzBuildFail"] = 0; |
| 228 | RetJson["UTCount_FuzzBuildSuccess"] = 0; |
| 229 | RetJson["APICount_FuzzBuildSuccess"] = 0; |
| 230 | RetJson["APICount_FuzzBuildFail"] = 0; |
| 231 |
nothing calls this directly
no test coverage detected