From 3a2949528130e9230a707446af3873d7446cf5b5 Mon Sep 17 00:00:00 2001 From: Ryad MEHIRI Date: Wed, 21 Oct 2026 10:41:44 +0200 Subject: [PATCH] Profil initial (gprof) de banque.c avant optimisation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version d'origine : 3,05 s en -O2 (médiane de 5 exécutions), empreinte ff68d260a7a58441. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 8 ++++ profil_avant.txt | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 .gitignore create mode 100644 profil_avant.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dcbbaf0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Fichiers produits par la compilation et l'exécution +banque +banque_pg +banque_eval +*.exe +*.o +gmon.out +rapport.txt diff --git a/profil_avant.txt b/profil_avant.txt new file mode 100644 index 0000000..91b892e --- /dev/null +++ b/profil_avant.txt @@ -0,0 +1,105 @@ +Flat profile: + +Each sample counts as 0.01 seconds. + % cumulative self self total + time seconds seconds calls s/call s/call name + 37.93 14.45 14.45 _mcount_private + 24.41 23.75 9.30 1 9.30 9.30 trier_par_montant + 9.17 27.25 3.50 1 3.50 3.50 nb_facons_rendre + 9.00 30.68 3.43 6017 0.00 0.00 longueur + 5.77 32.88 2.20 30000 0.00 0.00 rechercher_par_id + 5.25 34.88 2.00 __fentry__ + 4.72 36.67 1.80 1 1.80 1.80 nb_paires_opposees + 2.10 37.48 0.80 1 0.80 0.80 meilleure_periode + 0.58 37.70 0.22 1 0.22 0.22 nb_clients_distincts + 0.58 37.91 0.22 1 0.22 0.22 total_par_client + 0.26 38.02 0.10 1 0.10 0.10 total_par_jour + 0.14 38.07 0.06 30000 0.00 0.00 categorie + 0.08 38.10 0.03 main + 0.00 38.10 0.00 149998 0.00 0.00 alea + 0.00 38.10 0.00 6017 0.00 0.00 ajouter_ligne + 0.00 38.10 0.00 1 0.00 0.00 empreinte + 0.00 38.10 0.00 1 0.00 0.00 generer_transactions + + Call graph + + +granularity: each sample hit covers 4 byte(s) for 0.03% of 38.10 seconds + +index % time self children called name + +[1] 56.8 0.03 21.62 main [1] + 9.30 0.00 1/1 trier_par_montant [3] + 3.50 0.00 1/1 nb_facons_rendre [4] + 0.00 3.43 6017/6017 ajouter_ligne [5] + 2.20 0.00 30000/30000 rechercher_par_id [7] + 1.80 0.00 1/1 nb_paires_opposees [9] + 0.80 0.00 1/1 meilleure_periode [10] + 0.22 0.00 1/1 nb_clients_distincts [11] + 0.22 0.00 1/1 total_par_client [12] + 0.10 0.00 1/1 total_par_jour [13] + 0.06 0.00 30000/30000 categorie [14] + 0.00 0.00 1/1 generer_transactions [17] + 0.00 0.00 1/1 empreinte [16] +----------------------------------------------- + +[2] 37.9 14.45 0.00 _mcount_private [2] +----------------------------------------------- + 9.30 0.00 1/1 main [1] +[3] 24.4 9.30 0.00 1 trier_par_montant [3] +----------------------------------------------- + 266723738 nb_facons_rendre [4] + 3.50 0.00 1/1 main [1] +[4] 9.2 3.50 0.00 1+266723738 nb_facons_rendre [4] + 266723738 nb_facons_rendre [4] +----------------------------------------------- + 0.00 3.43 6017/6017 main [1] +[5] 9.0 0.00 3.43 6017 ajouter_ligne [5] + 3.43 0.00 6017/6017 longueur [6] +----------------------------------------------- + 3.43 0.00 6017/6017 ajouter_ligne [5] +[6] 9.0 3.43 0.00 6017 longueur [6] +----------------------------------------------- + 2.20 0.00 30000/30000 main [1] +[7] 5.8 2.20 0.00 30000 rechercher_par_id [7] +----------------------------------------------- + +[8] 5.2 2.00 0.00 __fentry__ [8] +----------------------------------------------- + 1.80 0.00 1/1 main [1] +[9] 4.7 1.80 0.00 1 nb_paires_opposees [9] +----------------------------------------------- + 0.80 0.00 1/1 main [1] +[10] 2.1 0.80 0.00 1 meilleure_periode [10] +----------------------------------------------- + 0.22 0.00 1/1 main [1] +[11] 0.6 0.22 0.00 1 nb_clients_distincts [11] +----------------------------------------------- + 0.22 0.00 1/1 main [1] +[12] 0.6 0.22 0.00 1 total_par_client [12] +----------------------------------------------- + 0.10 0.00 1/1 main [1] +[13] 0.3 0.10 0.00 1 total_par_jour [13] +----------------------------------------------- + 0.06 0.00 30000/30000 main [1] +[14] 0.1 0.06 0.00 30000 categorie [14] +----------------------------------------------- + 0.00 0.00 149998/149998 generer_transactions [17] +[15] 0.0 0.00 0.00 149998 alea [15] +----------------------------------------------- + 0.00 0.00 1/1 main [1] +[16] 0.0 0.00 0.00 1 empreinte [16] +----------------------------------------------- + 0.00 0.00 1/1 main [1] +[17] 0.0 0.00 0.00 1 generer_transactions [17] + 0.00 0.00 149998/149998 alea [15] +----------------------------------------------- + +Index by function name + + [8] __fentry__ [17] generer_transactions [9] nb_paires_opposees + [2] _mcount_private [6] longueur [7] rechercher_par_id + [5] ajouter_ligne [1] main [12] total_par_client + [15] alea [10] meilleure_periode [13] total_par_jour + [14] categorie [11] nb_clients_distincts [3] trier_par_montant + [16] empreinte [4] nb_facons_rendre