Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tron-explore
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张建华@五瓣科技
tron-explore
Commits
2400d4b3
Commit
2400d4b3
authored
Dec 28, 2020
by
jianhua.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps峰值接口重新调整
parent
28547bf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Engine.java
src/main/java/com/wuban/tron/explore/fetch/Engine.java
+2
-2
Executor.java
src/main/java/com/wuban/tron/explore/fetch/Executor.java
+3
-3
No files found.
src/main/java/com/wuban/tron/explore/fetch/Engine.java
View file @
2400d4b3
...
...
@@ -110,10 +110,10 @@ public class Engine {
/*
合约事件数据抓取、处理
*/
this
.
contractEventHandler
=
new
ContractEventHandler
();
/*
this.contractEventHandler = new ContractEventHandler();
this.contractEventFetcher = new ContractEventFetcher<>(this.contractEventHandler);
this.executor.execute(this.contractEventFetcher);
this
.
executor
.
execute
(
this
.
contractEventHandler
);
this.executor.execute(this.contractEventHandler);
*/
}
...
...
src/main/java/com/wuban/tron/explore/fetch/Executor.java
View file @
2400d4b3
...
...
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Slf4j
public
class
Executor
{
private
static
final
int
SIZE
=
6
;
private
static
final
int
SIZE
=
5
;
private
final
List
<
AbstractJob
>
jobList
=
new
ArrayList
<>();
private
final
String
name
;
private
ThreadPoolExecutor
pool
;
...
...
@@ -29,7 +29,7 @@ public class Executor {
this
.
name
=
name
;
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
2
,
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
new
ExecutorThreadFactory
());
log
.
info
(
"初始化线程池 name:{} coreSize:{} maxSize:{}"
,
name
,
SIZE
,
SIZE
*
2
);
log
.
info
(
"初始化线程池 name:{} coreSize:{} maxSize:{}"
,
name
,
SIZE
,
10
);
}
public
void
execute
(
final
AbstractJob
r
)
{
...
...
@@ -43,7 +43,7 @@ public class Executor {
}
public
void
rebuild
()
{
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
2
,
10L
,
TimeUnit
.
SECONDS
,
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
2
,
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
new
ExecutorThreadFactory
());
}
...
...
Write
Preview
Markdown
is supported
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