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

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


IHMO, we should go for a "expect failure" approach.

If it closes properly, we add a new entry in the spent-time list with the
difference between the session started (not from the launches list) and the
current time. so it would be:

    [3600, 1800, 600]

In seconds, as we might have gadget-like activities that are only being
used shortly.

If it doesn't close properly, it gets discarded naturally. No complex logic.

The only "improvement" it occurs to me, is that we could "commit" this time
regularly... so even if its laptops shutdown we could still get some
not-so-garbage data.



On Fri, Mar 28, 2014 at 11:42 AM, Gonzalo Odiard <godiard at sugarlabs.org>wrote:

>
>
>
> On Fri, Mar 28, 2014 at 12:00 PM, Jerry Vonau <me at jvonau.ca> wrote:
>
>> Hi Tony,
>>
>> > On March 28, 2014 at 7:38 AM Tony Anderson <tony_anderson at usa.net>
>> wrote:
>> >
>> >
>> > It is easier for users to understand shutting down the laptop by
>> > pressing the power button twice than to use the shutdown in the XO menu.
>> > However,
>> > this shutdown does not properly close open activities.
>> >
>>
>> Think the students need to learn how to use shutdown option in sugar,
>> wonder how many have lost their work using that method.
>>
>> > When the power light goes red, I would assume it would be possible to
>> > perform an orderly shutdown.
>> >
>>
>> I don't think there is a way for olpc's powerd to inform sugar that the XO
>> is powering down. I'm pretty sure SoaS/sugar desktop is in the same boat,
>> you tell sugar to shutdown the computer and that process uses dbus to tell
>> the OS but nothing in sugar is listening for a dbus shutdown signal from
>> outside of sugar to start an orderly shutdown.
>>
>>
> This is a good point. If is not filled in a ticket, can you fill one?
>
> Gonzalo
>
>
>
>> Jerry
>>
>>
>> > The record is of an activity session so maintaining a list of session
>> > information seems logical.
>> >
>> > One option is to record the launch time in the stop time at launch so
>> > that the metadata shows that a an activity session was started but not
>> > properly closed.
>> >
>> > Tony
>> >
>> >
>> > On 03/27/2014 09:45 PM, sugar-devel-request at lists.sugarlabs.org wrote:
>> > > 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.
>> >
>> > _______________________________________________
>> > Sugar-devel mailing list
>> > Sugar-devel at lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
>
>
> --
> Gonzalo Odiard
>
> SugarLabs - Learning Software for children
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140328/7306a018/attachment.html>


More information about the Sugar-devel mailing list