Is er een methode om te zien hoeveel memory een script gebruikt? of een methode om te zien hoeveel ruimte (bytes) een array lost? Ik gebruik vele arrays om tables compleet op te slaan voor bewerking. (Ik heb niet echt veel zin om met memory_limit het gebruik uit te vinden...)
Verwijderd
ik zou het niet direct weten... missschien even in een bestand wegschrijven en dan de grootte van het bestand als maatstaf nemen?
Ik weet niet.. Mijn updatescript duurt 3 minuten.. Dat kan ik zien in het programma top, op een Linux-machine.. Ik denk dat daar ook wel het geheugengebruik bijstaat?
En in Windows NT (dus ook 2000 en XP) heb je natuurlijk de Task Manager, waarbij je per proces ook kan zien hoeveel geheugen het gebruikt.. Moet je script alleen lang genoeg duren om het te kunnen zien
En in Windows NT (dus ook 2000 en XP) heb je natuurlijk de Task Manager, waarbij je per proces ook kan zien hoeveel geheugen het gebruikt.. Moet je script alleen lang genoeg duren om het te kunnen zien
http://php.net/getrusage
Bij gebrek aan rusage in Windows, werkt 't alleen onder Unix-achtigen.man rusage:
code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ru_maxrss the maximum resident set size utilized (in kilobytes). ru_ixrss an ``integral'' value indicating the amount of memory used by the text segment that was also shared among other pro- cesses. This value is expressed in units of kilobytes * ticks-of-execution. Ticks are statistics clock ticks. The statistics clock has a frequency of sysconf(_SC_CLOCK_TCK) ticks per second. ru_idrss an integral value of the amount of unshared memory residing in the data segment of a process (expressed in units of kilobytes * ticks-of-execution). ru_isrss an integral value of the amount of unshared memory residing in the stack segment of a process (expressed in units of kilobytes * ticks-of-execution).
Pagina: 1