Re: openssl s_time: refactor benchmark loops

2018-08-11 Thread Theo Buehler
On Sat, Aug 11, 2018 at 10:51:12AM -0500, Scott Cheloha wrote: > On Sat, Aug 11, 2018 at 11:22:09PM +0900, Kinichiro Inoguchi wrote: > > Hi, > > > > I saw that 2 loops are almost identical, and I think diff tidy up these 2 > > loops > > in 1 function. > > > > I found these 2 lines were not in or

Re: openssl s_time: refactor benchmark loops

2018-08-11 Thread Scott Cheloha
On Sat, Aug 11, 2018 at 11:22:09PM +0900, Kinichiro Inoguchi wrote: > Hi, > > I saw that 2 loops are almost identical, and I think diff tidy up these 2 > loops > in 1 function. > > I found these 2 lines were not in original code. > > > + shutdown(SSL_get_fd(scon), SHUT_RDWR); > > +

Re: openssl s_time: refactor benchmark loops

2018-08-11 Thread Kinichiro Inoguchi
Hi, I saw that 2 loops are almost identical, and I think diff tidy up these 2 loops in 1 function. I found these 2 lines were not in original code. > + shutdown(SSL_get_fd(scon), SHUT_RDWR); > + close(SSL_get_fd(scon)); Is this part needed ? Kinichiro Inoguchi On Thu,

openssl s_time: refactor benchmark loops

2018-08-09 Thread Scott Cheloha
Hi, s_time -- everyone's perennial pick for favorite openssl app -- has a lot of copy & paste. Here's a first shot at refactoring that away. We can merge the two benchmark loops, the timing stuff, and the report printing, as all of it is nearly identical. I modified as little as possible when m