Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MooBench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kieker
MooBench
Commits
3a38ed9e
Commit
3a38ed9e
authored
10 years ago
by
Jan Waller
Browse files
Options
Downloads
Patches
Plain Diff
improve output of TCPCountingReader Test
also fix shutdown of said test
parent
39901774
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frameworks/Kieker/src/kieker/tcp/TestExperiment1.java
+5
-3
5 additions, 3 deletions
frameworks/Kieker/src/kieker/tcp/TestExperiment1.java
with
5 additions
and
3 deletions
frameworks/Kieker/src/kieker/tcp/TestExperiment1.java
+
5
−
3
View file @
3a38ed9e
...
...
@@ -109,19 +109,20 @@ final class TCPCountingReader extends AbstractReaderPlugin {
private
final
ILookup
<
String
>
stringRegistry
=
new
Lookup
<
String
>();
final
AtomicInteger
counter
=
new
AtomicInteger
(
0
);
final
ScheduledExecutorService
executorService
;
public
TCPCountingReader
(
final
Configuration
configuration
,
final
IProjectContext
projectContext
)
{
super
(
configuration
,
projectContext
);
this
.
port1
=
this
.
configuration
.
getIntProperty
(
CONFIG_PROPERTY_NAME_PORT1
);
this
.
port2
=
this
.
configuration
.
getIntProperty
(
CONFIG_PROPERTY_NAME_PORT2
);
this
.
executorService
=
new
ScheduledThreadPoolExecutor
(
1
);
}
@Override
public
boolean
init
()
{
final
ScheduledExecutorService
executorService
=
new
ScheduledThreadPoolExecutor
(
1
);
executorService
.
scheduleAtFixedRate
(
new
Runnable
()
{
this
.
executorService
.
scheduleAtFixedRate
(
new
Runnable
()
{
public
void
run
()
{
LOG
.
info
(
"Records/s: "
+
TCPCountingReader
.
this
.
counter
.
getAndSet
(
0
));
System
.
out
.
println
(
"Records/s: "
+
TCPCountingReader
.
this
.
counter
.
getAndSet
(
0
));
}
},
0
,
1
,
TimeUnit
.
SECONDS
);
...
...
@@ -196,6 +197,7 @@ final class TCPCountingReader extends AbstractReaderPlugin {
public
void
terminate
(
final
boolean
error
)
{
LOG
.
info
(
"Shutdown of TCPReader requested."
);
this
.
executorService
.
shutdown
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment