freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][GSoC-2023-Ahmet] working fine


From: @goksu
Subject: [Git][freetype/freetype][GSoC-2023-Ahmet] working fine
Date: Wed, 30 Aug 2023 15:15:21 +0000

Ahmet Göksu pushed to branch GSoC-2023-Ahmet at FreeType / FreeType

Commits:

  • 267f1914
    by goksu at 2023-08-30T18:15:08+03:00
    working fine
    

1 changed file:

Changes:

  • src/tools/ftbench/ftbench.c
    ... ... @@ -243,7 +243,7 @@
    243 243
     #ifdef _POSIX_CPUTIME
    
    244 244
         clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &tv );
    
    245 245
     #else
    
    246
    -    clock_gettime( CLOCK_REALTIME, &tv );
    
    246
    +    clock_gettime( CLOCK_MONOTONIC, &tv );
    
    247 247
     #endif /* _POSIX_CPUTIME */
    
    248 248
     
    
    249 249
         return 1E6 * (double)tv.tv_sec + 1E-3 * (double)tv.tv_nsec;
    
    ... ... @@ -276,14 +276,17 @@ static void benchmark(FT_Face face, btest_t* test, int max_iter, double max_time
    276 276
         int NUM_CHUNKS = max_iter / CHUNK_SIZE;
    
    277 277
         double medians[NUM_CHUNKS];
    
    278 278
     
    
    279
    -    // Cache and warmup
    
    279
    +    // Cache
    
    280 280
         if (test->cache_first) { 
    
    281
    -      TIMER_START(&timer);
    
    282
    -      for(int i = 0; i<1+warmup; i++)    
    
    283
    -        test->bench(face, test->user_data);  
    
    284
    -      TIMER_STOP(&timer);  
    
    281
    +      test->bench(face, test->user_data);  
    
    285 282
         }
    
    286
    -    
    
    283
    +
    
    284
    +    // Warmup
    
    285
    +    TIMER_START(&timer);
    
    286
    +    for(int i = 0; i<warmup; i++)    
    
    287
    +        test->bench(face, test->user_data);  
    
    288
    +    TIMER_STOP(&timer);
    
    289
    +
    
    287 290
         printf("  %-25s ", test->title);
    
    288 291
         fflush(stdout);
    
    289 292
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]