pcp
[Top] [All Lists]

Few doc issues

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: Few doc issues
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Mon, 23 Nov 2015 11:50:00 +0200
Delivered-to: pcp@xxxxxxxxxxx
Organization: Red Hat
Reply-to: myllynen@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
Hi,

I see -O described in PCPIntro(1) as expected but pmprobe(1) and
pminfo(1) also discuss an -O related timezone issue which is not
described in PCPIntro(1), pmval(1), or pmdumptext(1). If the issue is a
general one, could the discussion perhaps moved to PCPIntro(1)? (While
at it, perhaps it could also be clarified a bit, I had to read it twice
to get a hang of it.)

Also, in few clients I see this kind of code used in preparation for a
pmSetMode(1) call:

#define SECS_IN_24_DAYS 2073600.0

static int
getXTBintervalFromTimeval(int *mode, struct timeval *tval)
{
    double tmp_ival = __pmtimevalToReal(tval);

    if (tmp_ival > SECS_IN_24_DAYS) {
        *mode = (*mode & 0x0000ffff) | PM_XTB_SET(PM_TIME_SEC);
        return ((int)tmp_ival);
    }
    else {
        *mode = (*mode & 0x0000ffff) | PM_XTB_SET(PM_TIME_MSEC);
        return ((int)(tmp_ival * 1000.0));
    }
}

I don't think merely by reading the current pmSetMode(1) a client
developer could instantly see something like this would be needed. As
per the best cargo-cult practices I already started to use something
similar in pmrep but might still be nice to have few words about this in
pmSetMode(1)?

Thanks,

-- 
Marko Myllynen

<Prev in Thread] Current Thread [Next in Thread>