This commit is contained in:
2025-09-15 17:40:58 +02:00
parent f09be2ba12
commit 7ba5104df5
4 changed files with 36 additions and 3 deletions

BIN
Get_ping_from_temp_log.pdf Normal file

Binary file not shown.

35
Rapport.txt Normal file
View File

@@ -0,0 +1,35 @@
Clémence DUCREUX
Clément JANNAIRE
Rapport TD2 :
daemon.c
create_daemon: complexité 3
ping_request: complexité 2
send_check: complexité 3
check_keep_working: complexité 4
daemon_work: complexité 3
db-sqlite.c
db_connect: complexité 1
db_disconnect: complexité 1
insert_hourly_report: complexité 1
ping-report.c
main: complexité 5
stats.c
get_ping_from_temp_log: complexité 14/15 (graph: Get_ping_from__temp_log.pdf)
write_ping_log: complexité 4
set_stats_ping: complexité 10 (graph: Set_stats_ping.pdf)
utils.c
write_pid_file: complexité 2
remove_file: complexité 1
Pour simplifier get_ping_from_temp_log, l'idée initiale à été de mettre tout de while dans une nouvelle fonction et dans la fonction
de base faire seulement appel à cette nouvelle fonction pour réduire la complixité.
POur simplifier set_stats_ping....

BIN
Set_stats_ping.pdf Normal file

Binary file not shown.

View File

@@ -244,6 +244,4 @@ void set_stats_ping(){
}else{ }else{
perror("stats : "); perror("stats : ");
} }
} }