]>
git.itanic.dy.fi Git - emerge-timer/log
Esko Kokkonen [Thu, 4 Sep 2014 15:33:41 +0000 (18:33 +0300)]
Fix a conflict in comparing emerge times
First look for the string indicating infinity and if this is not
found, then continue to the actual time comparisons. This was probably
broken in python3 -> python2 upgrade.
Esko Kokkonen [Thu, 4 Sep 2014 14:55:28 +0000 (17:55 +0300)]
Merge branch 'master' of /home/git/emerge-timer
Esko Kokkonen [Thu, 4 Sep 2014 14:52:56 +0000 (17:52 +0300)]
Add python3 compatibility
Only confilct in the scrip between python2 and python3 was the
behaviour of the print command. In python3 you can no long "print
foo", but you have to "print(foo").
Esko Kokkonen [Sun, 26 Aug 2012 09:37:06 +0000 (12:37 +0300)]
Change the max/min emerge time output
Display also the version for the maximum/minimum emerge time. For this
the seek_versions() needed a separate function for seek for the
version corresponding the given emerge time.
Esko Kokkonen [Fri, 24 Aug 2012 12:14:47 +0000 (15:14 +0300)]
search_syncs(): print how many syncs have been performed
Esko Kokkonen [Thu, 23 Aug 2012 14:55:27 +0000 (17:55 +0300)]
Apply conventional coding convention
That is, make lines shorter.
Esko Kokkonen [Thu, 23 Aug 2012 13:55:40 +0000 (16:55 +0300)]
Print emerge-date when displaying maximum and minimum emerge-datges.
Esko Kokkonen [Thu, 23 Aug 2012 13:39:53 +0000 (16:39 +0300)]
Create a function to find information from the "versions" list
At the moment it will only match the given emerge-time to its
emerge-date.
Esko Kokkonen [Thu, 23 Aug 2012 13:20:46 +0000 (16:20 +0300)]
Merge max_time() and min_time() functions
These two did basically the exact same things and only returned
different values, so merge them in order to streamline the code a bit.
Esko Kokkonen [Thu, 23 Aug 2012 13:10:53 +0000 (16:10 +0300)]
Separate the "in total spent emerging" stuff
Trying to make to important info more easy to find in the
output. Important info here means basically the average emerge time.
Esko Kokkonen [Thu, 23 Aug 2012 13:08:12 +0000 (16:08 +0300)]
Fix typo
Esko Kokkonen [Thu, 5 Apr 2012 15:36:13 +0000 (18:36 +0300)]
Remove the simulation section
Esko Kokkonen [Thu, 5 Apr 2012 13:35:06 +0000 (16:35 +0300)]
Merge branch 'master' of itanic.dy.fi:/home/git/emerge-timer
Esko Kokkonen [Thu, 5 Apr 2012 13:29:02 +0000 (16:29 +0300)]
Add background grid to the plot
Esko Kokkonen [Thu, 5 Apr 2012 13:25:01 +0000 (16:25 +0300)]
Don't print the total emerge time
Esko Kokkonen [Thu, 5 Apr 2012 13:24:26 +0000 (16:24 +0300)]
Add title to the plot
Esko Kokkonen [Thu, 5 Apr 2012 13:11:41 +0000 (16:11 +0300)]
Add better description for the help screen
Esko Kokkonen [Thu, 5 Apr 2012 13:09:13 +0000 (16:09 +0300)]
Change error messages for matplotlib
Esko Kokkonen [Thu, 5 Apr 2012 13:01:56 +0000 (16:01 +0300)]
Add possibility to plot emerge times into a 2D scatter plot
Using python package matplotlib we can plot emerge times of a certain
package into a 2D scatter plot that has the emerge date in the x-axis
and emerge time in seconds at the y-axis. This feature is entirely
voluntary, which means that matplotlib doesn't need to be installed in
order to use the other, simpler, features.
Esko Kokkonen [Thu, 16 Feb 2012 17:54:27 +0000 (19:54 +0200)]
Changes to --list option
Don't print the total emerge time since it seems to not work properly.
Esko Kokkonen [Sat, 21 Jan 2012 14:34:11 +0000 (16:34 +0200)]
Add support for showing emerge sync history
Esko Kokkonen [Sun, 8 Jan 2012 16:20:18 +0000 (18:20 +0200)]
Capture IOErrors
This enables the proper use of piping stuff from the program.
Esko Kokkonen [Sun, 8 Jan 2012 16:19:09 +0000 (18:19 +0200)]
Access full emerge histry option from the main function
It isn't good to access things outside the main function
Esko Kokkonen [Sun, 8 Jan 2012 13:34:34 +0000 (15:34 +0200)]
Don't print min/max times when there is only one emerge
Esko Kokkonen [Thu, 22 Dec 2011 17:46:34 +0000 (19:46 +0200)]
Add green and red functions
Use these functions instead of having to input color_start and
color_stop around strings.
Esko Kokkonen [Thu, 22 Dec 2011 17:18:22 +0000 (19:18 +0200)]
Add a bit of trivia to the end of "-l" listing
Esko Kokkonen [Thu, 22 Dec 2011 11:58:03 +0000 (13:58 +0200)]
Add preliminary support for listing all emerged packages with '-l' flag
Esko Kokkonen [Thu, 22 Dec 2011 11:07:18 +0000 (13:07 +0200)]
Add the ability to search emerge times for multiple packages at the
same time
Esko Kokkonen [Thu, 22 Dec 2011 10:04:50 +0000 (12:04 +0200)]
Remove the last dotted line in main printout
Have to remove this in order for the --quiet flag to work
Esko Kokkonen [Mon, 19 Dec 2011 21:32:28 +0000 (23:32 +0200)]
Make the dotted lines pretty
Esko Kokkonen [Mon, 19 Dec 2011 10:34:42 +0000 (12:34 +0200)]
Calculate min and max times correctly
Esko Kokkonen [Sun, 18 Dec 2011 12:13:23 +0000 (14:13 +0200)]
Don't print zero seconds printouts
This means that times that are for example exactly 60 seconds are now
just "1 minute" and not "1 minute 0 seconds".
Esko Kokkonen [Sun, 18 Dec 2011 12:10:41 +0000 (14:10 +0200)]
Give static current emerge time for the simulation run
Esko Kokkonen [Sun, 18 Dec 2011 12:09:15 +0000 (14:09 +0200)]
Use float number when dealing with the time simplification
This could bug out if you would give an int to the function, in which
case it wouldn't return correct results
Esko Kokkonen [Sat, 10 Dec 2011 16:22:46 +0000 (18:22 +0200)]
Modify printouts slightly
Make the lines in minimum/maximum printing sections behave a bit
better.
Esko Kokkonen [Sat, 10 Dec 2011 15:18:23 +0000 (17:18 +0200)]
Add empty file to third_fake_package directory
Stupid git...
Esko Kokkonen [Sat, 10 Dec 2011 15:15:18 +0000 (17:15 +0200)]
Add a check for a possible error scenario in the simulation mode
Esko Kokkonen [Sat, 10 Dec 2011 15:13:06 +0000 (17:13 +0200)]
Fix possible error in current emerge mode
This error could happen in cases where the current package has never
been emerged. The printout should now correctly just print 'unknown'
in these cases.
Esko Kokkonen [Tue, 29 Nov 2011 16:42:45 +0000 (18:42 +0200)]
Add empty files to the fake portage tree
Turns out git doesn't add empty directories.
Esko Kokkonen [Tue, 29 Nov 2011 16:39:28 +0000 (18:39 +0200)]
Add a simulation mode setting
This allows for the testing of the program to check for possible
errors and other things without actually running emerge
Esko Kokkonen [Tue, 29 Nov 2011 16:37:09 +0000 (18:37 +0200)]
Add the red colour
Esko Kokkonen [Tue, 29 Nov 2011 16:33:21 +0000 (18:33 +0200)]
Fix current emerge_time calculations
Change where in the for loop we actually put the emerge time into the
packages classes emerge_time variable. This means we have to change
the place where the initial "infinity" time is given.
Esko Kokkonen [Tue, 29 Nov 2011 16:31:42 +0000 (18:31 +0200)]
Don't crash if we can't calculate current emerge time
If we encounter an emerge time which for some reason we cannot
calculate (or something weird happens) printout only 'unknown'
Esko Kokkonen [Tue, 29 Nov 2011 16:30:09 +0000 (18:30 +0200)]
Change printouts with average times in current mode
Print average times also when there has been only one previous emerge.
Esko Kokkonen [Tue, 29 Nov 2011 15:56:28 +0000 (17:56 +0200)]
Change how current emerge time is calculated a bit
Instead of having some ceiling value for the emerge time (like it was
previously 12*3600 seconds) calculate current emerge time from each of
the entries in the log and choose the smallet value. This should
always be the last entry on the log and therefore the one that was
started closest to the current time.
In other words; the current emerge mode now works for all those
countless packages that take days compile.
Esko Kokkonen [Mon, 28 Nov 2011 09:10:53 +0000 (11:10 +0200)]
Trivial change in comment description
Esko Kokkonen [Sat, 26 Nov 2011 15:11:51 +0000 (17:11 +0200)]
list_emerge_processes(): Don't exit the program, only return from the function
Exiting the whole program at this early point is not always what we
want. It is better to exit the function and resume the main function
in case we want to do something else in the program.
Esko Kokkonen [Sat, 1 Oct 2011 11:21:47 +0000 (14:21 +0300)]
Give text some color
The "any time now" message was missing its color.
Esko Kokkonen [Sun, 25 Sep 2011 11:11:56 +0000 (14:11 +0300)]
Fix crash if package has never been emerged
Show message that the package hasn't been emerged before.
Esko Kokkonen [Sat, 24 Sep 2011 14:45:20 +0000 (17:45 +0300)]
Don't overwrite global no color flag
This takes into accout if we have defined green_start as "" globally
and therefore don't need to do that again in the give_time function.
Esko Kokkonen [Sat, 24 Sep 2011 14:36:16 +0000 (17:36 +0300)]
print_versions(): Pad strings correctly when colors are used
Color characters aren't counted when they appear in the screen, but
len() does count them, so we need a special fix for the padding to
work properly in these cases.
Esko Kokkonen [Sat, 24 Sep 2011 14:32:24 +0000 (17:32 +0300)]
give_time(): Add nocolor option
Calling the noclor=True causes the function to return the time string
without the colors.
Esko Kokkonen [Sat, 24 Sep 2011 11:33:10 +0000 (14:33 +0300)]
Beautify output (cont.)
Have the date string also start on the same place on each row.
Esko Kokkonen [Sat, 24 Sep 2011 11:32:03 +0000 (14:32 +0300)]
Change variable name
"string_lenght" -> "version_length". More descriptive names are
better!
Esko Kokkonen [Sat, 24 Sep 2011 11:23:51 +0000 (14:23 +0300)]
Beautify output
Have the '>>>' start on the same place on each row for easy emerge
time comparison.
Esko Kokkonen [Sat, 24 Sep 2011 11:13:43 +0000 (14:13 +0300)]
Fix spacing in current emerge printout
Add one additional space to the printing so different packages are
sort of on their own.
Esko Kokkonen [Fri, 23 Sep 2011 13:57:22 +0000 (16:57 +0300)]
Fix error with global variable name
This was left unchanged after a recent commit
Esko Kokkonen [Fri, 23 Sep 2011 12:17:29 +0000 (15:17 +0300)]
Rename functions time() and date()
Rename these because time() and date() are probably defined somewhere
else too, and they're not very descriptive function names anyway.
Esko Kokkonen [Sun, 18 Sep 2011 19:42:06 +0000 (22:42 +0300)]
Add the --quiet flag
This option gives less verbose output
Esko Kokkonen [Sun, 18 Sep 2011 15:11:37 +0000 (18:11 +0300)]
Print total emerge time when inquiring pretended times.
For this to work, the print_pretended_times() needs to return the
average time.
Esko Kokkonen [Sun, 18 Sep 2011 15:03:04 +0000 (18:03 +0300)]
Drop time() and date() from the class
These don't need to be inside the class as they don't contribute to
the class variables in any way.
Esko Kokkonen [Sun, 18 Sep 2011 14:56:20 +0000 (17:56 +0300)]
Don't return function if exception occurs
So remove the return line from the finally block.
Esko Kokkonen [Sun, 18 Sep 2011 14:49:57 +0000 (17:49 +0300)]
Capitalize global variable name
Easier to keep track of variables if this one is all in capitals since
it really is a global one.
Esko Kokkonen [Sun, 18 Sep 2011 14:42:46 +0000 (17:42 +0300)]
Refine code structure and add function descriptions
A futile attempt at making the code more readable.
Esko Kokkonen [Sun, 18 Sep 2011 14:34:43 +0000 (17:34 +0300)]
Add the "--no-color" flag
Esko Kokkonen [Sun, 18 Sep 2011 14:32:23 +0000 (17:32 +0300)]
Set the default mode as "package"
This way we don't overwrite the mode setting if we want to use for
example current emerge mode.
Esko Kokkonen [Sun, 18 Sep 2011 14:28:37 +0000 (17:28 +0300)]
Merge branch 'testing'
Not really a merge since removed everything that was in 'master'
branch. Stuff might be broken too.
Esko Kokkonen [Wed, 14 Sep 2011 09:08:48 +0000 (12:08 +0300)]
Improve commandline argument handling
Esko Kokkonen [Sat, 10 Sep 2011 11:14:40 +0000 (14:14 +0300)]
Remove unused variables
Esko Kokkonen [Sat, 10 Sep 2011 11:14:22 +0000 (14:14 +0300)]
Remove unused module imports
Esko Kokkonen [Sat, 10 Sep 2011 11:12:35 +0000 (14:12 +0300)]
Make lines shorter
Esko Kokkonen [Sat, 10 Sep 2011 11:11:05 +0000 (14:11 +0300)]
Quit the current emerge block is no emerge is found
Esko Kokkonen [Sat, 10 Sep 2011 11:10:41 +0000 (14:10 +0300)]
Fix possible error situations
Esko Kokkonen [Sat, 10 Sep 2011 10:48:44 +0000 (13:48 +0300)]
Add current emerge time feature
Esko Kokkonen [Sat, 10 Sep 2011 10:10:25 +0000 (13:10 +0300)]
Split up average_total_time() and max_min_time()
Esko Kokkonen [Wed, 7 Sep 2011 19:03:13 +0000 (22:03 +0300)]
Rewrite commandline argument handling
Giving no arguments now prints the help screen. The current emerge
mode can be accessed using the '-c' flag.
Esko Kokkonen [Wed, 7 Sep 2011 13:35:23 +0000 (16:35 +0300)]
Remove needless module import
Subprocess module requirement was removed from the code a while ago.
Esko Kokkonen [Wed, 7 Sep 2011 13:33:11 +0000 (16:33 +0300)]
open_log(): Don't allow finally block to swallow function return
If we run into the exception here, we don't need to return from this
function but to exit the whole program anyway.
Esko Kokkonen [Wed, 7 Sep 2011 13:30:20 +0000 (16:30 +0300)]
Fix indendation error
Esko Kokkonen [Wed, 7 Sep 2011 13:29:53 +0000 (16:29 +0300)]
get_date: remove unused variables
Esko Kokkonen [Sun, 4 Sep 2011 15:28:04 +0000 (18:28 +0300)]
Print the emerge number for that package
Esko Kokkonen [Thu, 1 Sep 2011 10:42:31 +0000 (13:42 +0300)]
Add pretended packages
Esko Kokkonen [Thu, 1 Sep 2011 09:33:29 +0000 (12:33 +0300)]
Change how we pass the package into the log parser
Don't use a list but only pass the class object into the function.
Esko Kokkonen [Mon, 29 Aug 2011 15:10:32 +0000 (18:10 +0300)]
Remove list_all_packages function
This function is no longer used anywhere as both the current emerge
stuff and pretended emerges are handled differently.
Esko Kokkonen [Mon, 29 Aug 2011 15:05:21 +0000 (18:05 +0300)]
Improve current process handling
Use the same method of getting the package name as in the pretended
function. Now the print_current_emerges function is simplified by not
having to go through the list of all the package names.
Esko Kokkonen [Mon, 29 Aug 2011 15:04:25 +0000 (18:04 +0300)]
Search ps with "ebuild.sh" instaed of "ebuild"
"ebuild" can match processes that don't handle the current emerge and
thus wont contain the package name.
Esko Kokkonen [Mon, 29 Aug 2011 10:40:06 +0000 (13:40 +0300)]
list_pretended: Don't print total time if there is only one package
Esko Kokkonen [Mon, 29 Aug 2011 10:39:21 +0000 (13:39 +0300)]
list_pretended: Don't query the all_packages function at all
This is no longer needed thanks to the previous commit.
Esko Kokkonen [Mon, 29 Aug 2011 10:14:22 +0000 (13:14 +0300)]
list_pretended: Change how the package name is parsed from stdin
Implement a better way of getting the package name and version from
stdin. This doesn't involve going through a list of all packages in
such a tedious way it was before. Only thing this now requires is that
the version number of any package always starts with a digit. So a
version number like "-1.0" is totally fine, but a version number like
"-r1-1.0" is not. Hopefully the latter ones aren't that common.
Esko Kokkonen [Mon, 29 Aug 2011 10:02:22 +0000 (13:02 +0300)]
First implementation of the pretended packages feature
Esko Kokkonen [Fri, 26 Aug 2011 15:40:33 +0000 (18:40 +0300)]
minor fixing
Esko Kokkonen [Fri, 26 Aug 2011 10:39:12 +0000 (13:39 +0300)]
Add min, max, average time printouts
Esko Kokkonen [Fri, 26 Aug 2011 09:39:25 +0000 (12:39 +0300)]
Add get_package function
Esko Kokkonen [Fri, 26 Aug 2011 09:30:53 +0000 (12:30 +0300)]
Fix but with packages with names with '-'s in them
So like packages name 'gcc-config'
Esko Kokkonen [Thu, 25 Aug 2011 16:52:43 +0000 (19:52 +0300)]
Improve class functionality
Esko Kokkonen [Thu, 25 Aug 2011 16:22:41 +0000 (19:22 +0300)]
Cleanup the main_loop code
It's mostly the same stuff, only slightly in a different order to
attempt to optimize the emerge log scanning a bit.
Esko Kokkonen [Thu, 25 Aug 2011 09:53:41 +0000 (12:53 +0300)]
more rewriting
basic functionality added. is now usable.
Esko Kokkonen [Wed, 24 Aug 2011 09:05:17 +0000 (12:05 +0300)]
Remove 'times' global variable
The local 'times' variable is still use in various functions.
Esko Kokkonen [Wed, 24 Aug 2011 10:18:08 +0000 (13:18 +0300)]
rewriting
added first class structure
Esko Kokkonen [Wed, 24 Aug 2011 09:03:44 +0000 (12:03 +0300)]
Don't print anything if a package hasn't been emerged