Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
ExplorViz
explorviz-github-archive
common
Commits
337d0cf8
Commit
337d0cf8
authored
10 years ago
by
Florian Fittkau
Browse files
Options
Downloads
Patches
Plain Diff
some disruptor improvements
parent
ce54b104
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/explorviz/live_trace_processing/filter/AbstractFilter.java
+5
-2
5 additions, 2 deletions
...xplorviz/live_trace_processing/filter/AbstractFilter.java
with
5 additions
and
2 deletions
src/explorviz/live_trace_processing/filter/AbstractFilter.java
+
5
−
2
View file @
337d0cf8
...
...
@@ -3,9 +3,11 @@ package explorviz.live_trace_processing.filter;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
com.lmax.disruptor.BlockingWaitStrategy
;
import
com.lmax.disruptor.EventHandler
;
import
com.lmax.disruptor.RingBuffer
;
import
com.lmax.disruptor.dsl.Disruptor
;
import
com.lmax.disruptor.dsl.ProducerType
;
import
explorviz.live_trace_processing.filter.counting.CountingThroughputFilter
;
import
explorviz.live_trace_processing.record.IRecord
;
...
...
@@ -21,7 +23,7 @@ public abstract class AbstractFilter implements IPipeReceiver {
private
IRecord
[]
outputBuffer
;
private
int
outputBufferIndex
;
public
final
static
ExecutorService
cachedThreadPool
=
Executors
public
final
ExecutorService
cachedThreadPool
=
Executors
.
newCachedThreadPool
();
public
AbstractFilter
(
final
IPipeReceiver
receiver
,
...
...
@@ -38,7 +40,8 @@ public abstract class AbstractFilter implements IPipeReceiver {
final
Disruptor
<
RecordArrayEvent
>
disruptor
=
new
Disruptor
<
RecordArrayEvent
>(
new
RecordArrayEventFactory
(
OUTPUT_MESSAGE_BUFFER_SIZE
),
RINGBUFFER_LENGTH
,
cachedThreadPool
);
RINGBUFFER_LENGTH
,
cachedThreadPool
,
ProducerType
.
SINGLE
,
new
BlockingWaitStrategy
());
@SuppressWarnings
(
"unchecked"
)
final
EventHandler
<
RecordArrayEvent
>[]
eventHandlers
=
new
EventHandler
[
1
];
...
...
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