[Sugar-devel] Time spent on activity (was Best time format for logging?)

Martin Abente martin.abente.lahaye at gmail.com
Fri Mar 28 07:27:34 EDT 2014


As long as we don't expect to have a 1-to-1 relation between the new "spent
times per session" and launch times I think it will be fine.

We have to make sure everyone understand this will not be 100% reliable.
 We might loose some of these spent times when the laptop or activity
crashes, activities could be left opened for hours etc, but, I don't think
we should be worried in the practice. As Walter said, is still better than
nothing.

I see benefit in both approaches, and I guess they are not mutually
exclusive:

One Big Sum:  it could be interesting to use this information to sort
entries in the journal ie., "sort entries by spent time", so it would be
good to have that info already processed, it could have some value.

Series: the benefit of having this split as series instead of just one big
sum, is that it could give extra information about the time its being spent
on each "session" individually.

Regarding harvest, we can carefully drop that placeholder, and add a new
table for storing these times, if needed.


On Fri, Mar 28, 2014 at 6:53 AM, Walter Bender <walter.bender at gmail.com>wrote:

> Sorry for chiming in late. I was indespoised yesterday.
>
> I think there is no harm in gathering the data as a series. If we have
> missing elements due to crashes, etc., it is still better than
> nothing. Originally, I was thinking of adding something in the same
> place where we trigger write_file so that we accumulated data each
> time the activity was in the background or closed (a bit more robust)
> but honestly, I don't think it really matters so much).
>
>
> On Thu, Mar 27, 2014 at 4:02 PM, Gonzalo Odiard <godiard at sugarlabs.org>
> wrote:
> >
> >
> >
> > On Thu, Mar 27, 2014 at 4:17 PM, Manuel Quiñones <manuq at laptop.org>
> wrote:
> >>
> >> 2014-03-27 15:23 GMT-03:00 Gonzalo Odiard <godiard at sugarlabs.org>:
> >> > Maybe have sense save the spent time as a list too,
> >> > like we do with launch times.
> >> > Looks like a non invasive change, and a good source of information.
> >>
> >> Good point, is the other option I was handling.  Is a trivial patch too:
> >>
> >> https://github.com/manuq/sugar-toolkit-gtk3/pull/8/files
> >>
> >> I think this one is definetely better.
> >>
> >> I was in doubt for two reasons: 1. because unlike launch_time, this
> >> spent-times metadata will not be saved if the activity does not end
> >> properly: could be a crash, a programming error, end of battery, etc.
> >> So the item N of spent-times will not necessarily correspont to item N
> >> of launch-times.
> >>
> >
> > While is true you don't have how much time was spent in every session,
> > the sequence is good data anyway.
> >
> >>
> >> And secondly, because the simpler option satisfies the placeholder
> >> that is currently in Harvest
> >>
> >>
> https://github.com/tchx84/harvest-server/blob/master/sql/001-harvest.sql#L24
> >>
> >> The second one will require a new table in Harvest.  But that's an
> >> easy change too.
> >
> >
> > Ok, would be good have tch involved then.
> >
> >>
> >>
> >> Side note: I see we have a horrible mix of styles in metadata, some
> >> names use underscore (title_set_by_user, activity_id) and some use
> >> minus character (share-scope, icon-color, launch-times).  Does anyone
> >> know the preferred style?
> >>
> >
> > No idea about that
>
> This has always bothered me, but I am not sure how we address it
> without breaking lots of code.
>
> >
> > Gonzalo
>
> -walter
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140328/79330327/attachment.html>


More information about the Sugar-devel mailing list