-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file handles / processes / atime #464
base: main
Are you sure you want to change the base?
Conversation
Here is some more timing data for different directories:
Time 2 achieving around 10 seconds is probably good enough for the sake of recording file signals. The only problem that remains now is trying to filter out files accessed by background processes. Using stricter whitelists/blacklists we can probably avoid most of these arbitrary files by filetype, but if that doesn't prove to be sufficient then @0dm do you think it would be possible to somehow find the previously opened files of a process by its PID, since we're already able to access the PID of the current window? Overall this seems promising and I'll see how well it works during a recording! |
How many files were in each test? Could you provide the len() of files? |
For current files I think it might be possible using handle.exe https://learn.microsoft.com/en-ca/sysinternals/downloads/handle , |
Yea for sure its just unfortunate that many applications only have the files open momentarily making it unreasonable to catch them with handles, I'll see how well access time does alone 👍 |
@0dm this looks great. Is this ready to merge? Can we add a small test? Any suggestions for mac? Can you please also document usage, including build comands? 🙏 |
There are tests in I'm not sure if it should be merged given that it has not been fully "connected" to OpenAdapt yet, it's more like 2 standalone tools, though we can call
There's
Yes, I'll also rename There's a |
I think we can just name it |
there are three programs, the names are just temporary -- I didn't know what to call them.
openadapt/external:
time (from slack):
python3 lm.py 0.07s user 0.26s system 47% cpu 0.706 total
to go through 18622 files
windows only:
vwin
this will list all top level windows and creation time
qsysinfo
this will list the number of handles and threads, memory usage, and process name for all processes.
there are more attributes that can be output -- see https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntquerysysteminformation