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

Walter Bender walter.bender at gmail.com
Fri Mar 28 06:53:10 EDT 2014


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


More information about the Sugar-devel mailing list