[commtech bench] Take the mean over 10 run.
This commit is contained in:
parent
006b1b1d94
commit
6c2868e20c
|
@ -12,7 +12,7 @@ binList="$(ls -1 "${binDir}"| sed '$!s/$/ /' | tr -d '\n')"
|
|||
nbProdList="1" # Nombre de cores producteurs
|
||||
typeProdList="none matrice useless_loop" # Methode pour produire les valeurs
|
||||
typeCacheList="L2 Memory" # Niveau de cache partage
|
||||
perfOpt="stat -e cycles -e L1-dcache-loads -e L1-dcache-stores -e LLC-load-misses -e LLC-store-misses"
|
||||
perfOpt="stat -r 10 -e cycles -e L1-dcache-loads -e L1-dcache-stores -e LLC-load-misses -e LLC-store-misses"
|
||||
|
||||
# Const
|
||||
nbIter="5000000" # Nb de lignes produites
|
||||
|
|
|
@ -418,6 +418,7 @@ main()
|
|||
metriquePattern="[[:digit:]]+ +cycles "
|
||||
ylabel="Nb cycles" ;;
|
||||
total_time)
|
||||
metriquePattern="[[:digit:]]+ +seconds time elapsed "
|
||||
metriquePattern="total_time: [[:digit:].]+"
|
||||
ylabel="Secondes" ;;
|
||||
*)
|
||||
|
|
|
@ -240,7 +240,6 @@ int analyse_options(int argc, char *argv[])
|
|||
void *producer(void *channel)
|
||||
{
|
||||
int i, j;
|
||||
struct timeval tv1, tv2, tv_result;
|
||||
|
||||
if (init_producer_thread(channel))
|
||||
{
|
||||
|
@ -280,24 +279,11 @@ void *producer(void *channel)
|
|||
fprintf(stderr, "Initialization of calculation has failed\n");
|
||||
return &page_size; /* &page_size can't be NULL, whatever NULL is bound to */
|
||||
}
|
||||
gettimeofday(&tv1, NULL);
|
||||
for(i = 0; i < nb_bufs_sent; i++) {
|
||||
//printf("[%p] Send %d new CACHE_LINE\n", (void *) pthread_self(), BUF_SIZE / CACHE_LINE_SIZE);
|
||||
for(j = 0; j < WORDS_PER_BUF; j++)
|
||||
send(do_calc());
|
||||
}
|
||||
//print_results(WORDS_PER_BUF, nb_bufs_sent);
|
||||
gettimeofday(&tv2, NULL);
|
||||
tv_result.tv_sec = tv2.tv_sec - tv1.tv_sec;
|
||||
if (tv2.tv_usec < tv1.tv_usec)
|
||||
{
|
||||
tv_result.tv_usec = tv1.tv_usec - tv2.tv_usec;
|
||||
tv_result.tv_sec--;
|
||||
}
|
||||
else
|
||||
tv_result.tv_usec = tv2.tv_usec - tv1.tv_usec;
|
||||
printf("total_time: %u.%06u\n", (unsigned) tv_result.tv_sec,
|
||||
(unsigned) tv_result.tv_usec);
|
||||
if (end_calc())
|
||||
{
|
||||
fprintf(stderr, "uninitialization of calculation has failed\n");
|
||||
|
|
Loading…
Reference in New Issue