Opened 9 years ago
Last modified 7 years ago
#3007 new defect
pygrass.messages.Messenger.percent() smallest step is 2
Reported by: | lrntct | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.4 |
Component: | LibGIS | Version: | svn-trunk |
Keywords: | Cc: | ||
CPU: | x86-64 | Platform: | Linux |
Description
Even when the measured task is several hours long, Messenger.percent() displays steps two by two, instead of an expected one by one. This could give the false impression that the execution has stalled.
Bellow is a minimum working example:
from grass.pygrass.messages import Messenger import time total_time = 1000 msgr = Messenger() for i in range(total_time): msgr.percent(i, total_time, 1) time.sleep(0.5)
Change History (7)
comment:1 by , 9 years ago
Milestone: | 7.1.0 → 7.2.0 |
---|
comment:2 by , 9 years ago
Component: | PyGRASS → LibGIS |
---|
I change the component fom pygrass to LibGis since I see the problem also with C code:
#include<unistd.h> #include <grass/gis.h> int main() { int row; int nrows = 1352; G_message("Percent complete..."); for (row = 0; row < nrows; row++) { G_percent(row, nrows, 1); usleep(10000); } G_percent(1, 1, 1); return 0; }
Looking at the G_percent
code I don't understand when is used the function G_set_percent_routine(int (*percent_routine) (int))
within the GRASS code and where the default percent_routine is defined.
comment:4 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:7 by , 7 years ago
Milestone: | → 7.2.4 |
---|
Note:
See TracTickets
for help on using tickets.
Milestone renamed