Skip to content

Commit 19188c0

Browse files
committed
Further cancel time reduction of oltpxcrun --no-awr
1 parent aac4461 commit 19188c0

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

bin/oltpcore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ do
250250
echo -n " "`expr $procs - $procnumber`
251251
rwloadsim $mute59 -u -r -i simulatebatch:=$simulatebatch -i procnumber:=$procnumber \
252252
--flush-stop=$runperiod --flush-every=2 -v -i runperiod:=$runperiod \
253-
-W -i xc_run_dedicated:=$xc_run_dedicated $extra_args -i proccount:=$procs -R $prepfile $quiet $runfile &
253+
-W -i xc_run_dedicated:=$xc_run_dedicated -i doawr:=$doawr $extra_args -i proccount:=$procs -R $prepfile $quiet $runfile &
254254
quiet='-q' # only messages from first
255255
procnumber=`expr $procnumber + 1`
256256
if test x$killfile != x

oltp/run.rwl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@ $if xc_enabled $then
189189
if xc_stopnow=1 or xc_stopnow=2 then break; end if;
190190
end loop;
191191
if xc_stopnow=1 or xc_stopnow=2 then
192-
wait 2;
193-
xc_kill();
192+
if doawr then
193+
wait 20; # Allow some time for flushing things
194+
else
195+
wait 1;
196+
end if;
197+
xc_kill("process " procnumber);
194198
end if;
195199
$endif
196200
end;

oltp/runsys.rwl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@ $if xc_enabled $then
157157
if xc_stopnow=1 or xc_stopnow=2 then break; end if;
158158
end loop;
159159
if xc_stopnow=1 or xc_stopnow=2 then
160-
# Wait up to 30s before killing myself
161-
# to give time to awr end snapshot
162-
double killtime := runseconds + 30;
163-
for wait 2 stop killtime loop
164-
if awrend_done then break; end if;
165-
end loop;
166-
wait 2;
167-
xc_kill();
160+
if doawr then
161+
# Wait up to 30s before killing myself
162+
# to give time to awr end snapshot
163+
double killtime := runseconds + 30;
164+
for wait 2 stop killtime loop
165+
if awrend_done then break; end if;
166+
end loop;
167+
end if;
168+
wait 1;
169+
xc_kill("process runsys");
168170
end if;
169171
end threads;
170172
$endif
@@ -216,6 +218,7 @@ $endif
216218
end loop;
217219
end threads;
218220

221+
$if !xc_enabled $then
219222
# save the buffer cache and shared pool sizes every pool_size_interval
220223
# and at end
221224
threads 1 at rwloadsim
@@ -225,6 +228,7 @@ $endif
225228
# gather end values as well
226229
savecaches();
227230
end threads;
231+
$endif
228232

229233
# Create the SQL that will collact top ash data
230234
threads 1

oltp/xc_implementation.rwl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ $endif
191191
end if;
192192
end;
193193

194-
procedure xc_kill() nostatistics
194+
procedure xc_kill(string killmsg) nostatistics
195+
fprintf stderr, "Now terminating %s - ", killmsg;
195196
abort;
196197
end xc_kill;

0 commit comments

Comments
 (0)