Closed Bug 1293156 Opened 8 years ago Closed 8 years ago

Remove excess verbosity from ssl_gtests

Categories

(NSS :: Test, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mt, Assigned: mt)

Details

Attachments

(1 file)

Now that we have 1200 tests, the amount of output is getting a little unwieldy.  Most of the output is only useful if you are trying to debug a test.

On my machine this seems to help quite a bit with speed of ssl_gtests I get a huge reduction in sys time by reducing verbosity:

Before:
real    0m33.715s
user    0m16.828s
sys     0m12.452s

After: 
real    0m20.398s
user    0m15.125s
sys     0m0.800s

(The WeakDH tests are disabled here because those execute in hugely variable time.)
Attachment #8778746 - Flags: review?(ttaubert)
Attachment #8778746 - Flags: review?(ekr)
Assignee: nobody → martin.thomson
Summary: Remove excess verbosity from gtests → Remove excess verbosity from ssl_gtests
Comment on attachment 8778746 [details] [diff] [review]
lessverbose.patch

Review of attachment 8778746 [details] [diff] [review]:
-----------------------------------------------------------------

Sounds like a good idea to me, I think we should do this.

::: external_tests/ssl_gtest/test_io.cc
@@ +463,5 @@
>  
>  bool Poller::Poll() {
> +  if (g_ssl_gtest_verbose) {
> +    std::cerr << "Poll() waiters = " << waiters_.size()
> +              << " timers = " << timers_.size() << std::endl;

Is there a reason this doesn't use LOGV() too?
Attachment #8778746 - Flags: review?(ttaubert) → review+
Comment on attachment 8778746 [details] [diff] [review]
lessverbose.patch

Review of attachment 8778746 [details] [diff] [review]:
-----------------------------------------------------------------

::: external_tests/ssl_gtest/tls_agent.cc
@@ +534,5 @@
>    }
>  }
>  
>  void TlsAgent::Connected() {
> +  LOGV("Handshake success");

This could probably be LOG()

@@ +651,2 @@
>    }
> + 

Extra whitespace.
Attachment #8778746 - Flags: review?(ekr) → review+
(In reply to Tim Taubert [:ttaubert] from comment #1)
> >  bool Poller::Poll() {
> > +  if (g_ssl_gtest_verbose) {
> > +    std::cerr << "Poll() waiters = " << waiters_.size()
> > +              << " timers = " << timers_.size() << std::endl;
> 
> Is there a reason this doesn't use LOGV() too?

Yeah, LOG[V]() uses member variables that aren't on Poller.

Fixed ekr's nits and landed:
https://hg.mozilla.org/projects/nss/rev/59f4e005fd22
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: