Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
b7c5a419
Commit
b7c5a419
authored
Jan 03, 2017
by
Maxime Perrotin
Browse files
test-iterator displays execution time
parent
74a59dd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/regression/test-iterators/test.adb
View file @
b7c5a419
...
...
@@ -20,6 +20,9 @@ with Ada.containers.ordered_maps;
with
Ada
.
containers
.
vectors
;
use
Ada
.
containers
;
with
ada
.
calendar
;
use
ada
.
calendar
;
procedure
test
is
-- Reproduce the Context, and import it
type
States
is
(
running
,
wait
);
...
...
@@ -215,8 +218,9 @@ procedure test is
exhaust_arr
;
end
;
event
:
Event_ty
(
start
);
S_Hash
:
Hash_Type
;
event
:
Event_ty
(
start
);
S_Hash
:
Hash_Type
;
Start_Time
:
Time
:=
Clock
;
begin
put_line
(
"Exhaustive simulation. Hit Ctrl-C to stop if it is too long..."
);
orchestrator
.
startup
;
...
...
@@ -226,11 +230,11 @@ begin
queue
.
append
(
S_Hash
);
visited
.
append
(
S_Hash
);
while
queue
.
Length
>
0
loop
--put_line (queue.length'img);
orchestrator_ctxt
:=
Grafset
.
Element
(
Key
=>
queue
.
Last_Element
).
Context
;
exhaustive_simulation
;
queue
.
delete_last
;
end
loop
;
put_line
(
"Executed"
&
count
'
img
&
" functions"
);
put_line
(
"Visited"
&
Grafset
.
Length
'
img
&
" states"
);
Put_Line
(
"Execution time:"
&
Duration
'
Image
(
Clock
-
Start_Time
)
&
"s."
);
end
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment