[Include] dFile
#20

My result:


Test script:
Код:
#include <a_samp>
#include <dfile>
#include <Fini>

#define TESZT 500

public OnFilterScriptInit()
{
	new string[128];
    dfile_Create("Dfile.txt");
    dfile_Create("scriptfiles/Fini.txt");

    new Dfile = GetTickCount();

  	dfile_Open("Dfile.txt");
  	print("\n\n\n");
  	print("Writing data:");
  	print("----------------------------");
    for(new i; i < TESZT; i++)
    {
        format(string, sizeof(string), "teszt%d", i);
        dfile_WriteString(string, "test");
    }
    dfile_SaveFile();
    printf("[DFILE] writing time: %d", GetTickCount() - Dfile);

    new Fini = GetTickCount();

    Fini_OpenFile("Fini.txt");
    for(new i; i < TESZT; i++)
    {
       format(string, sizeof(string), "test%d", i);
       Fini_SetStr(string, "test");
    }
	Fini_SaveFile();
    Fini_CloseFile();
    printf("[FINI] writing time: %d", GetTickCount() - Fini);
    printf("\n\n\n");
    print("Reading data:");
    print("----------------------------");
    Dfile = GetTickCount();
    dfile_Open("Dfile.txt");
    new dfilevalue, finivalue;
    while(GetTickCount() - Dfile < 1000)
    {
        dfile_ReadString("teszt1");
        dfilevalue++;
    }
    dfile_CloseFile();
    printf("[DFILE] reading time: %d", dfilevalue);
    Fini = GetTickCount();
    Fini_OpenFile("Fini.txt");
    while(GetTickCount() - Fini < 1000)
    {
        Fini_GetStr("test1");
        finivalue++;
    }
    Fini_CloseFile();
    printf("[FINI] readingtime: %d", finivalue);
    return true;
}
Reply


Messages In This Thread
dFile - by Drake1994 - 29.01.2011, 11:43
Re: dFile - by SlashPT - 29.01.2011, 11:51
Re: dFile - by Fool - 29.01.2011, 12:03
Re: dFile - by Zh3r0 - 29.01.2011, 12:15
Re: dFile - by Drake1994 - 29.01.2011, 12:18
Re: dFile - by Zh3r0 - 29.01.2011, 12:20
Re: dFile - by iMonk3y - 29.01.2011, 12:22
Re: dFile - by SlashPT - 29.01.2011, 12:26
Re: dFile - by [03]Garsino - 29.01.2011, 13:12
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:14
Re: dFile - by iMonk3y - 29.01.2011, 13:27
Re: dFile - by Drake1994 - 29.01.2011, 13:31
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:35
Re: dFile - by [03]Garsino - 29.01.2011, 13:36
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:50
Re: dFile - by Drake1994 - 29.01.2011, 14:03
Respuesta: dFile - by luis_lpv_22 - 29.01.2011, 14:09
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:15
Re: dFile - by [03]Garsino - 29.01.2011, 14:27
Re: dFile - by Drake1994 - 29.01.2011, 14:35
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:41
Re: dFile - by [03]Garsino - 29.01.2011, 14:44
Re: dFile - by Drake1994 - 29.01.2011, 14:45
Re: dFile - by [03]Garsino - 29.01.2011, 14:50
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:50
Re: dFile - by Lorenc_ - 29.01.2011, 14:53
Re: dFile - by Drake1994 - 29.01.2011, 14:59
Re: dFile - by Hal - 29.01.2011, 15:12
Re: dFile - by Drake1994 - 29.01.2011, 15:15
Respuesta: dFile - by ipsBruno - 29.01.2011, 15:57

Forum Jump:


Users browsing this thread: 4 Guest(s)