Re: [Sugar-devel] Best time format for logging?

2014-03-06 Thread Martin Dluhos
On 28.2.2014 19:57, Walter Bender wrote:
> It seems time on activity is an oft-requested feature. IMHO, we should
> maintain those data in the activity instance metadata like we do
> launch times et al. Should be a fairly straight-forward patch.

I second this request. Elapsed activity time is what I've been really missing
when looking at Sugar statistics in Nepal. This info is available as part of
sugar-stats, but that is currently not being used in deployments with the
exception of Sameer's India deployment.

Martin

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-03-01 Thread Manuel Quiñones
2014-02-28 20:30 GMT-03:00 James Cameron :
> On Fri, Feb 28, 2014 at 02:39:41PM -0300, Manuel Quiñones wrote:
>> date +%s.%N
>> 1393609027.074597846
>
> Yes, this is adequate, though sometimes the fractional value can be
> imprecise as it depends on many factors.
>
> For response times, it is useful, but care should be taken to record
> the value in the most primitive form and do the conversion to text
> some other time, otherwise the measurement can affect the result.
>
> For the case in olpc-utils you change in your patch, use the %s format
> character.  You don't need higher resolution for that use case.
>
> The epoch time is the most useful, as it is independent of time zone
> configuration on the system.
>
> In the case of your code, you can optimise it to avoid creating a
> process to exec /bin/date, by using printf in bash:
>
> printf 'START_SUGAR %(%s)T\n' -1 >> $HOME/.olpc-launch-stats
>
> If you use -2 instead of -1, you will get the time the olpc-session
> process started, rather than the current time.

Oh, I see, great!

Thanks for the valuable information, James.

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread James Cameron
On Fri, Feb 28, 2014 at 02:39:41PM -0300, Manuel Quiñones wrote:
> date +%s.%N
> 1393609027.074597846

Yes, this is adequate, though sometimes the fractional value can be
imprecise as it depends on many factors.

For response times, it is useful, but care should be taken to record
the value in the most primitive form and do the conversion to text
some other time, otherwise the measurement can affect the result.

For the case in olpc-utils you change in your patch, use the %s format
character.  You don't need higher resolution for that use case.

The epoch time is the most useful, as it is independent of time zone
configuration on the system.

In the case of your code, you can optimise it to avoid creating a
process to exec /bin/date, by using printf in bash:

printf 'START_SUGAR %(%s)T\n' -1 >> $HOME/.olpc-launch-stats

If you use -2 instead of -1, you will get the time the olpc-session
process started, rather than the current time.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Manuel Quiñones
Interesting Nagarjuna,

2014-02-28 12:36 GMT-03:00 Nagarjuna G :
> On Friday, February 28, 2014 09:12:58 AM Walter Bender wrote:
>
>> It seems time on activity is an oft-requested feature. IMHO, we should
>
>> maintain those data in the activity instance metadata like we do
>
>> launch times et al. Should be a fairly straight-forward patch.
>
>>
>
>> (My rationale is that making it part of the activity metadata, it is
>
>> accessible to the Sugar user -- part of the effort to "make learning
>
>> visible" to the learner, not just the administrator.)
>
>>
>
>
>
>
>
> On of the requirements of our work is to have the log time in millisecond,
> or microseconds if possible. We would like to measure response times in Chat
> activity. Often, multiple responses can be seen within one second when a
> group is chatting, which does not allow us to calculate the response times.
> We did tweak our local instance of Chat activity to write logs with
> microseconds. But it will be good if this feature is available across all
> activities.

I guess it depends on the data.  Nanoseconds can be obtained with command:

date +%s.%N
1393609027.074597846

>
>
>
> --
>
> GN
>
>



-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Nagarjuna G
On Friday, February 28, 2014 09:12:58 AM Walter Bender wrote:
> It seems time on activity is an oft-requested feature. IMHO, we should
> maintain those data in the activity instance metadata like we do
> launch times et al. Should be a fairly straight-forward patch.
> 
> (My rationale is that making it part of the activity metadata, it is
> accessible to the Sugar user -- part of the effort to "make learning
> visible" to the learner, not just the administrator.)
> 


On of the requirements of our work is to have the log time in millisecond, or 
microseconds if possible.  We would  like to measure response times in Chat 
activity.  
Often, multiple responses can be  seen within one second when a group is 
chatting, 
which does not allow us to  calculate the response times.  We did tweak our 
local 
instance of Chat activity to  write logs with microseconds.  But it will be 
good if this 
feature is available across  all activities. 

--
GN

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Walter Bender
It seems time on activity is an oft-requested feature. IMHO, we should
maintain those data in the activity instance metadata like we do
launch times et al. Should be a fairly straight-forward patch.

(My rationale is that making it part of the activity metadata, it is
accessible to the Sugar user -- part of the effort to "make learning
visible" to the learner, not just the administrator.)

-walter



On Fri, Feb 28, 2014 at 9:09 AM, Manuel Quiñones  wrote:
> 2014-02-28 11:04 GMT-03:00 Walter Bender :
>> We've discussed (in AU) adding something similar to Sugar activities:
>> a metadata field with the elapsed time that the activity is visible.
>> We should coordinate all of these changes.
>
> Absolutely. I'm trying Martin's Harvest and looking how it can be extended.
>
> Thanks for the time format tip.
>
> --
> .. manuq ..



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Manuel Quiñones
2014-02-28 11:04 GMT-03:00 Walter Bender :
> We've discussed (in AU) adding something similar to Sugar activities:
> a metadata field with the elapsed time that the activity is visible.
> We should coordinate all of these changes.

Absolutely. I'm trying Martin's Harvest and looking how it can be extended.

Thanks for the time format tip.

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Walter Bender
We've discussed (in AU) adding something similar to Sugar activities:
a metadata field with the elapsed time that the activity is visible.
We should coordinate all of these changes.

regards.

-walter

On Fri, Feb 28, 2014 at 9:01 AM, Walter Bender  wrote:
> I think the seconds format is more useful for the purposes of
> subsequent analysis.
>
> -walter
>
> On Fri, Feb 28, 2014 at 8:48 AM, Manuel Quiñones  wrote:
>> Hi, this is a general question but related with Sugar.
>>
>> I have made changes in olpc-utils to log the session duration and kind
>> (Sugar or GNOME).  This will be used for statistics.
>> https://github.com/manuq/olpc-utils/compare/boot-stats?expand=1
>>
>> My log format is now:
>>
>> START_SUGAR 27/Feb/2014:17:33:17
>> END 27/Feb/2014:17:59:47
>> START_SUGAR 27/Feb/2014:18:00:24
>> END 27/Feb/2014:18:44:54
>> START_GNOME 27/Feb/2014:18:45:30
>> END 27/Feb/2014:18:50:26
>> START SUGAR 27/Feb/2014:18:51:03
>> END 27/Feb/2014:18:57:58
>>
>> But I see that in many places Linux logs times as date +%s, which
>> outputs seconds like: 1393595186 .
>>
>> What is best?
>>
>> --
>> .. manuq ..
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Best time format for logging?

2014-02-28 Thread Walter Bender
I think the seconds format is more useful for the purposes of
subsequent analysis.

-walter

On Fri, Feb 28, 2014 at 8:48 AM, Manuel Quiñones  wrote:
> Hi, this is a general question but related with Sugar.
>
> I have made changes in olpc-utils to log the session duration and kind
> (Sugar or GNOME).  This will be used for statistics.
> https://github.com/manuq/olpc-utils/compare/boot-stats?expand=1
>
> My log format is now:
>
> START_SUGAR 27/Feb/2014:17:33:17
> END 27/Feb/2014:17:59:47
> START_SUGAR 27/Feb/2014:18:00:24
> END 27/Feb/2014:18:44:54
> START_GNOME 27/Feb/2014:18:45:30
> END 27/Feb/2014:18:50:26
> START SUGAR 27/Feb/2014:18:51:03
> END 27/Feb/2014:18:57:58
>
> But I see that in many places Linux logs times as date +%s, which
> outputs seconds like: 1393595186 .
>
> What is best?
>
> --
> .. manuq ..
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Best time format for logging?

2014-02-28 Thread Manuel Quiñones
Hi, this is a general question but related with Sugar.

I have made changes in olpc-utils to log the session duration and kind
(Sugar or GNOME).  This will be used for statistics.
https://github.com/manuq/olpc-utils/compare/boot-stats?expand=1

My log format is now:

START_SUGAR 27/Feb/2014:17:33:17
END 27/Feb/2014:17:59:47
START_SUGAR 27/Feb/2014:18:00:24
END 27/Feb/2014:18:44:54
START_GNOME 27/Feb/2014:18:45:30
END 27/Feb/2014:18:50:26
START SUGAR 27/Feb/2014:18:51:03
END 27/Feb/2014:18:57:58

But I see that in many places Linux logs times as date +%s, which
outputs seconds like: 1393595186 .

What is best?

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel