@@ -192,10 +192,24 @@ procedure exec1mqueries()
192192 integer tot := 0;
193193 modify sql selNmb for genqry;
194194
195+ double perqrymb := 0;
196+
195197 # make sure it is parsed
196198 for selNmb loop
197199 null;
200+ # the 76 bytes we add here is experimentally found to be
201+ # the overhead in shipping the row with the five columns
202+ perqrymb += (76
203+ +lengthb(yt0)
204+ +lengthb(yt1)
205+ +lengthb(yt2)
206+ +lengthb(yt3)
207+ +lengthb(yt4)
208+ )/1e6 ;
198209 end loop;
210+ if verbosetest and threadnumber = 1 then
211+ printf "%.3fMB logical per query\n", perqrymb;
212+ end if;
199213
200214 if runseconds > timestart then
201215 printline "Thread " threadnumber " starting late at " runseconds ", expected starttime " timestart;
@@ -214,16 +228,8 @@ procedure exec1mqueries()
214228 end if;
215229 for selNmb loop
216230 tot += 1;
217- # the 75 bytes we add here is experimentally found to
218- # be the overhead in shipping one row with five columns
219- totalmb += (75
220- +lengthb(yt0)
221- +lengthb(yt1)
222- +lengthb(yt2)
223- +lengthb(yt3)
224- +lengthb(yt4)
225- )/1048576.0 ;
226231 end loop;
232+ totalmb += perqrymb;
227233 end loop;
228234
229235 if verbosetest then
@@ -240,7 +246,7 @@ procedure start1mqueries()
240246
241247 double netmb1, netmb2;
242248 sql qrybytes
243- select s.value/1048576 netmb2 from
249+ select s.value/1e6 netmb2 from
244250 v$mystat s join v$statname n
245251 on s.statistic# = n.statistic#
246252 where n.name = 'bytes sent via SQL*Net to client'
@@ -308,10 +314,10 @@ end if;
308314if increaseramp then
309315 if dophys then
310316 printf "Unreliable throughput estimate %.3f GB/s logical, %.3f GB/s physical\n"
311- , totalmb/period/1024 .0, totalnetmb/period/1024 .0;
317+ , totalmb/period/1000 .0, totalnetmb/period/1000 .0;
312318 else
313319 printf "Unreliable throughput estimate %.3f GB/s logical\n"
314- , totalmb/period/1024 .0;
320+ , totalmb/period/1000 .0;
315321 end if;
316322 printline "Rerun with --rampup=" rampup+increaseramp " or higher to ensure all threads are executing concurrently";
317323 if docsv then
@@ -320,10 +326,10 @@ if increaseramp then
320326else
321327 if dophys then
322328 printf "Throughput estimate %.3f GB/s logical, %.3f GB/s physical\n"
323- , totalmb/period/1024 .0, totalnetmb/period/1024 .0;
329+ , totalmb/period/1000 .0, totalnetmb/period/1000 .0;
324330 else
325331 printf "Throughput estimate %.3f GB/s logical\n"
326- , totalmb/period/1024 .0;
332+ , totalmb/period/1000 .0;
327333 end if;
328334 if docsv then
329335 fprintf csvfile, csvformat, concurrency, totalmb/period, totalnetmb/period, 0;
0 commit comments