LISTSERV mailing list manager LISTSERV 16.5

Help for QSERV-L Archives


QSERV-L Archives

QSERV-L Archives


QSERV-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

QSERV-L Home

QSERV-L Home

QSERV-L  May 2014

QSERV-L May 2014

Subject:

Re: Fwd: [LSST-data] input about logging needed by mid next week

From:

Bill Chickering <[log in to unmask]>

Reply-To:

General discussion for qserv (LSST prototype baseline catalog)

Date:

Tue, 13 May 2014 14:05:34 -0700

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (47 lines)

Hi K-T -

See my responses below. . .

Regards,
Bill

On May 13, 2014, at 6:40 AM, Kian-Tat Lim <[log in to unmask]> wrote:

> Bill,
> 
> 	auto_ptr is a bit much; more typical is just to construct a
> local variable that will go out of scope at the end of the block:
> 
> {
>    LOG_CTX context("demo");
>    // ...
> }
Fair enough. I've updated the demo code in qserv and the Trac documentation to use the above pattern, which indeed works just fine.

> 
> 	It might be nice to have context objects for MDC as well.
Are you envisioning distinct objects solely for MDC. That is, one MDC context object per key/value pair?

> 
> 	I'm a little worried about the copies in the ProtoLogFormatter
> constructor.  Have you timed this?
This very well could be an issue. With the threshold set such that logging messages do not print, calls to the present ProtoLog API can take 5 to 13 microseconds (or longer) depending on the amount of formatting. This is dramatically longer than the few nanoseconds of the previous implementation that used varargs and snprintf.

At the same time, I have shown that by mapping macros such as LOG_INFO() or LOG_DEBUG() to the new macro LOG_NO_OP() (see the latest code) this overhead can be reduced to about 20 nanoseconds in a production environment. I elaborate on this a bit in the latest Trac documentation.

Perhaps I can speed things up by avoiding unnecessary copying. I'll look into this.

> 
> 	And does supporting operator% mean you *can't* support snprintf?
> Or would that require a whole parallel set of macros?
It is certainly possible to provide a varargs/snprintf interface using separate macros and/or functions. I toyed around a bit with the goal of unifying this interface style with that of boost::format, but an elegant solution wasn't immediately apparent to me. Do you believe having both of these interfaces available is desirable? Or should there be a policy that embraces one over the other in which case we would not gain from complicating the logging API? Perhaps the timing measurements reported above make the varargs/snprintf option more attractive. 
> 
> -- 
> Kian-Tat Lim, LSST Data Management, [log in to unmask]

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

March 2018
February 2018
January 2018
December 2017
August 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use