Guest User

Testing. (BlueX)

a guest
Mar 11th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.89 KB | None | 0 0
  1. forward SpeedTest(); public SpeedTest(){
  2.    
  3.     print("- Creating Files (SII)");
  4.     if(INI_Open(TESTFILE)) {    
  5.         INI_WriteString("Teste","Chegou");        
  6.  
  7.         INI_Save();        
  8.         INI_Close();        
  9.     }
  10.     new tick;
  11.    
  12.     print("- Starting Test (SII)");
  13.    
  14.     tick=GetTickCount();
  15.     for(new i;i<TESTS;i++)
  16.     {
  17.         if(INI_Open(TESTFILE)) {
  18.             INI_WriteString("Teste2","Chegou");          
  19.             INI_Close();    
  20.         }
  21.     }
  22.     printf("(SII)Tempo: %d", GetTickCount()-tick);    
  23.     print(" ");    
  24.     print(" ");
  25.    
  26. }
  27. forward SpeedTest1(); public SpeedTest1(){  
  28.     print("- Creating Files (RocksFiles)");
  29.     if(!RocksFile_Existe(TESTFILE2)) {    
  30.         RocksFile_Criar(TESTFILE2);
  31.         RocksFile_Carregar(TESTFILE2,TESTFILE2);
  32.         RocksFile_Escrever(TESTFILE2,"Teste","Chegou");
  33.         RocksFile_Salvar(TESTFILE2);        
  34.     }
  35.     new tick;
  36.    
  37.     print("- Starting Test(RocksFiles)");
  38.    
  39.     tick=GetTickCount();
  40.     for(new i;i<TESTS;i++)
  41.     {
  42.         if(RocksFile_Existe(TESTFILE2)) {            
  43.             RocksFile_Escrever(TESTFILE2,"Teste2","Chegou");          
  44.         }
  45.     }
  46.     printf("(RocksFiles)Tempo: %d -", GetTickCount()-tick);
  47.     print(" ");    
  48.     print(" ");
  49. }
  50. forward SpeedTest2(); public SpeedTest2(){  
  51.  
  52.     print("- Creating Files(DINI)");
  53.     if(!dini_Exists(TESTFILE3)) {    
  54.         dini_Create(TESTFILE3);
  55.         dini_Set(TESTFILE3,"Teste","Chegou");      
  56.     }
  57.     new tick;
  58.    
  59.     print("- Starting Test(DINI)");
  60.    
  61.     tick=GetTickCount();
  62.     for(new i;i<TESTS;i++)
  63.     {
  64.         if(dini_Exists(TESTFILE3)) {            
  65.             dini_Set(TESTFILE3,"Teste2","Chegou");
  66.         }
  67.     }
  68.     printf("(DINI)Tempo: %d -", GetTickCount()-tick);
  69.     print(" ");
  70.     print(" ");  
  71. }
  72. forward StartTest(); public StartTest() {
  73.     print("Starting Test====");    
  74.     SpeedTest();    
  75.     SpeedTest1();    
  76.     SpeedTest2();    
  77.     return 1;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment