Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
files read/written
Is there a way to know what files have been read and written during the execution of a php script? I think it would be interesting to test this with pages generated by GetSimple (different versions, with or without plugins...).

There are several plugins to get other performance measurements (page generation time, memory usage...)
Do you think this file access thing could be done by a plugin, or is it necessary to patch the core?
My dev plugin outputs some stuff as well, such as includes, peak memory, etc.

To log files written there are 2 options I can think of.

We allow plugins to write their own data, we could prevent this and force the use of an internal class for writing files, which could have a hook or logging mechanism.

A file storage class is already something we need anyway, its too much work for plugin authors to have to create a mechanism for saving and retrieving custom settings when we could build it in.


You could check all writable file mod stamps, and compare them to an execution start and end timestamp of the script.

This is the best option for a plugin. I could even add this to my dev suite plugin.

Of course there are probably all kinds of OS level stuff you could do also.

There is a third option for controlled installs using pecl APD and php function_override to replace the typical file saving functions with your own.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Thanks for the ideas, Shawn.
Carlos Wrote:Thanks for the ideas, Shawn.

Curious, what were you interested in gleaming from this info?
Dev side or client performance?
Auto triggers?
Just curious how it's useful or can be used
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix

Users browsing this thread: 1 Guest(s)