Skip to content
Snippets Groups Projects
Commit e8f9bf43 authored by Rafael S Castilho's avatar Rafael S Castilho
Browse files

SCRUM#81: fixed spelling error

parent 35389266
No related branches found
No related tags found
2 merge requests!51Merge development to master,!47Issue/72
Pipeline #
...@@ -44,13 +44,13 @@ Json::Value get_net_bandwidth() { ...@@ -44,13 +44,13 @@ Json::Value get_net_bandwidth() {
pack_tr_allt = 0; pack_tr_allt = 0;
} else { } else {
b_rec_allt = b_rec_allt =
net_band_all_time["data_net"]["bytes_recived"].asLargestUInt(); net_band_all_time["data_net"]["bytes_received"].asLargestUInt();
pack_rec_allt = pack_rec_allt =
net_band_all_time["data_net"]["packets_recived"].asLargestUInt(); net_band_all_time["data_net"]["packets_received"].asLargestUInt();
b_tr_allt = b_tr_allt =
net_band_all_time["data_net"]["bytes_transmited"].asLargestUInt(); net_band_all_time["data_net"]["bytes_transmitted"].asLargestUInt();
pack_tr_allt = pack_tr_allt =
net_band_all_time["data_net"]["packets_tranmited"].asLargestUInt(); net_band_all_time["data_net"]["packets_tranmitted"].asLargestUInt();
} }
...@@ -182,10 +182,10 @@ Json::Value get_net_bandwidth() { ...@@ -182,10 +182,10 @@ Json::Value get_net_bandwidth() {
pack_tr = atoll(t.substr(j, len).c_str()); pack_tr = atoll(t.substr(j, len).c_str());
ofs.open("net_band.json", std::ios::trunc); ofs.open("net_band.json", std::ios::trunc);
net_band_all_time["data_net"]["bytes_recived"] = b_rec; net_band_all_time["data_net"]["bytes_received"] = b_rec;
net_band_all_time["data_net"]["packets_recived"] = pack_rec; net_band_all_time["data_net"]["packets_received"] = pack_rec;
net_band_all_time["data_net"]["bytes_transmited"] = b_tr; net_band_all_time["data_net"]["bytes_transmitted"] = b_tr;
net_band_all_time["data_net"]["packets_tranmited"] = pack_tr; net_band_all_time["data_net"]["packets_tranmitted"] = pack_tr;
ofs << net_band_all_time; ofs << net_band_all_time;
ofs.close(); ofs.close();
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
...@@ -196,10 +196,10 @@ Json::Value get_net_bandwidth() { ...@@ -196,10 +196,10 @@ Json::Value get_net_bandwidth() {
getline(time_file, str); getline(time_file, str);
time_file.close(); time_file.close();
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
net_band["data_net"]["bytes_recived"] = b_rec - b_rec_allt; net_band["data_net"]["bytes_received"] = b_rec - b_rec_allt;
net_band["data_net"]["packets_recived"] = pack_rec - pack_rec_allt; net_band["data_net"]["packets_received"] = pack_rec - pack_rec_allt;
net_band["data_net"]["bytes_transmited"] = b_tr - b_tr_allt; net_band["data_net"]["bytes_transmitted"] = b_tr - b_tr_allt;
net_band["data_net"]["packets_tranmited"] = pack_tr - pack_tr_allt; net_band["data_net"]["packets_tranmitted"] = pack_tr - pack_tr_allt;
net_band["data_net"]["collect_time"] = str; net_band["data_net"]["collect_time"] = str;
myfile.close(); myfile.close();
return (net_band); return (net_band);
......
...@@ -43,23 +43,23 @@ function processor() { ...@@ -43,23 +43,23 @@ function processor() {
[[ "$obj" != "null" ]] [[ "$obj" != "null" ]]
} }
function bytes_recived() { function bytes_received() {
obj=$(cat net.json | jq -r '.data_net.bytes_recived') obj=$(cat net.json | jq -r '.data_net.bytes_received')
[[ "$obj" -ge 0 ]] [[ "$obj" -ge 0 ]]
} }
function bytes_transmited() { function bytes_transmitted() {
obj=$(cat net.json | jq -r '.data_net.bytes_transmited') obj=$(cat net.json | jq -r '.data_net.bytes_transmitted')
[[ "$obj" -ge 0 ]] [[ "$obj" -ge 0 ]]
} }
function packets_recived() { function packets_received() {
obj=$(cat net.json | jq -r '.data_net.packets_recived') obj=$(cat net.json | jq -r '.data_net.packets_received')
[[ "$obj" -ge 0 ]] [[ "$obj" -ge 0 ]]
} }
function packets_transmited() { function packets_transmitted() {
obj=$(cat net.json | jq -r '.data_net.packets_transmited') obj=$(cat net.json | jq -r '.data_net.packets_transmitted')
[[ "$obj" -ge 0 ]] [[ "$obj" -ge 0 ]]
} }
...@@ -81,23 +81,23 @@ teardown() { ...@@ -81,23 +81,23 @@ teardown() {
rm -f net.json rm -f net.json
} }
@test "Bytes Recived" { @test "Bytes Received" {
run bytes_recived run bytes_received
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
@test "Bytes Transmited" { @test "Bytes Transmitted" {
run bytes_transmited run bytes_transmitted
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
@test "Packets Recived" { @test "Packets Received" {
run packets_recived run packets_received
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
@test "Packets Trasmited" { @test "Packets Trasmitted" {
run packets_transmited run packets_transmitted
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
......
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