-
Notifications
You must be signed in to change notification settings - Fork 2
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
ChromeTabs #8
Comments
TL;DR: Do it! I also have an extension installed which displays the open tabs (»Tab Count«). That's where I synchronized the ps-output with, as it was easier than counting tabs. Why do you think this is better? Getting the psutil output is quite good, I think. Creating a file with the amount of tabs would still need a 'translator' to put that information into a database (you could, of course, post the information from the plugin directly into a sqlite db). So, the only question remains: Why do you think, a Chrome plugin is better suited? |
Using a Chrome plugin would give instant feedback of the tab count. But i agree that this is a problem, if you have got a huge amount of data already collected. Only plotting changes in tab count would result in gaps between data points while plotting. But this also happens, if you turn off your mac and ps isnt able to count anymore. How do you handle this case? |
But PS also gives instant feedback! The »problem« is only a problem for people already using this. Which should be only me. So, not to much of a problem. Gaps in data series are just »no changes«. At the moment I'm handling off-time not at all, as I have not yet made a tab count evaluation which was more sophisticated than plotting all data points ;). Btw: When closing 20 tabs at once, directly after another, this would lead to 20 distinct data points… so maybe there should be a minimum of 30 seconds between each tab count saving? |
One could also implement something like: Save changes every 30 seconds (if there are any) and save the absolute amount every hour/day/whatever to include some redundancy as a cross-check. |
I'm against that. You would need to respect that in every evaluation you do. Also, I don't think you need that kind of redundancy… |
Alternatively: take the changes reported from the plugin and calculate the absolute value with the last database entry. That way you cannot mess up the absolute count. And the amount of data is the same (because in both cases 32-bit integers are saved). |
Why would you mess up the absolute count? The extension still writes absolute values into the database. |
Ah sorry, I got that you wanted to save the difference in open tabs (like +1, -2) in the database. This would fail if just one entry is flawed. |
I am pretty sure, that there is a better way to count Chrome Tabs
I used a Chrome Extension that was able to display the number of opened tabs in all Chrome windows. it should be easy to rewrite this tool to write to a file, every time the number of tabs changes.
If you are interested in this kind of chrome-extension (at least i am), i would take care of this in the next days...
The text was updated successfully, but these errors were encountered: