Commit Graph

47 Commits

Author SHA1 Message Date
吴晟 Wu Sheng dc05539361
DataCarrier changes a `#consume` API to add properties as a parameter to initialize consumer (#7452) 2021-08-13 14:05:10 +08:00
吴晟 Wu Sheng 50a0bcbf73
Optimize L1 aggregation, enhance gRPC client between L1 and L2 aggregation. (#7206)
1.0Performance: Add L1 aggregation flush period, which reduces the CPU load and helps young GC.

2. Replace do not direct send after the first aggregation to reduce the network #6400.

3. Enhance the DataCarrier to notify the consumer in no enqueue event in short term.

4. L1 aggregation flush period still works even no further metrics generated, powered by <3>

5. Fix gRPC remote client OOM. The concurrency control mechanism failed.
2021-06-30 19:14:20 +08:00
Stephen Ni d4ea997523
chore: add @Override tag on some methods (#6304) 2021-02-03 09:46:57 +08:00
lijial 0950c1ad6e
ArrayBlockingQueueBuffer del IF_POSSIBLE strategy (#6053)
* ArrayBlockingQueueBuffer del IF_POSSIBLE strategy

* update CHANGES.md

Co-authored-by: 李家良 <jialiang.li@tongdun.cn>
2020-12-22 16:05:04 +08:00
吴晟 Wu Sheng e6265ba5be
Fix DataCarrier's `org.apache.skywalking.apm.commons.datacarrier.buffer.Buffer` implementation isn't activated in `IF_POSSIBLE` mode. (#6048) 2020-12-22 07:54:15 +08:00
zcai2 48479b74df
test: fix flaky test in comsumerTest (#5846)
Co-authored-by: Cai, Zhouxiang <zc31@illinois.edu>
Co-authored-by: Zhenxu Ke <kezhenxu94@apache.org>
2020-11-16 16:19:47 +08:00
kezhenxu94 0171ff6a01
Promote Integer to Long before multiplying to avoid numeric overflow (#5602) 2020-10-02 19:53:48 +08:00
Daming f39c0dd274
fix to release incorrectly lock when it is failed to obtain lock (#5610)
Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2020-10-01 22:49:39 +08:00
Xin,Zhang 1cddb60a00
add @SuppressWarnings(NonAtomicVolatileUpdate) (#5606)
Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2020-10-01 17:28:18 +08:00
zhang-wei 736dc3d3ec
Remove some unused variables (#5598) 2020-10-01 14:51:07 +08:00
Xin,Zhang 772f1d2e82
Replace Class.newInstance() with getDeclaredConstructor().newInstance() (#5600)
Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2020-10-01 12:56:28 +08:00
Kdump 8a8df3550e
fix Classcanbestatic (#5597)
Inner class is non-static but does not reference enclosing class

ref: https://errorprone.info/bugpattern/ClassCanBeStatic

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2020-10-01 08:18:00 +08:00
李文广 b8e5ff516c
Remove Buffer redundant strategy judgment code. (#5277) 2020-08-09 16:21:36 +08:00
kezhenxu94 7b071bd7f7
Fix nested query and type conversion in MySQL, remove unused codes (#4738) 2020-05-04 13:54:12 +08:00
Brandon Fergerson 778b86e1de
Update ConsumeDriver.java (#4610)
spelling fix
2020-04-06 07:17:31 +08:00
kezhenxu94 5b255ba3e3
Set up more strict code styles and fix existing issues (#4337)
Motivation:

Review code styles with some bots automatically.

Modifications:

Set up ReviewDog in GitHub Action to review code style.

Add more check rules to checkstyle plugin.

Result:

Obvious code styles can be reviewed and commented automatically.
2020-02-11 17:10:49 +08:00
Muxin 84792873b8 typo error (#3914) 2019-11-21 21:11:27 +08:00
吴晟 Wu Sheng d7038fe67b
Refactor DataCarrier, support ArrayBlockingQueueBuffer as implementor (#3849)
* Refactor DataCarrier, support ArrayBlockingQueueBuffer as the implementation for blocking queue buffer.

* Fix style issue.

* Remove import.

* Remove uesless codes.
2019-11-15 23:33:40 +08:00
Daming 8faa356403 Using ArrayList to instead of LinkedList (#3093)
* Using ArrayList to instead of LinkedList
2019-07-17 13:26:00 +08:00
Roshi 7f3ff150ab One more time for heigher performance (#2930)
V3(this commit) has 20% performance improvement leverages from no `false-sharing` of CPU cache mechanism.
  /**
     * Benchmark                                                 Mode  Cnt         Score         Error  Units
     * AtomicRangeIntegerTest.testGetAndIncrementV1Performance  thrpt    5  13496720.554 ±  240134.803  ops/s
     * AtomicRangeIntegerTest.testGetAndIncrementV2Performance  thrpt    5  39201251.850 ± 1005866.969  ops/s
     * AtomicRangeIntegerTest.testGetAndIncrementV3Performance  thrpt    5  45832615.061 ± 2987464.163  ops/s
     */
2019-06-29 15:18:03 +08:00
龟仙老人 f414d72dd5 Rewrite AtomicRangeInteger for higher performance (#2874)
Typical test benchmark for performance improvement. Check PR for more detail.

/**
     * # JMH version: 1.21
     * # VM version: JDK 1.8.0_111, Java HotSpot(TM) 64-Bit Server VM, 25.111-b14
     * # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/bin/java
     * # VM options: -Dfile.encoding=UTF-8
     * # Warmup: 3 iterations, 10 s each
     * # Measurement: 5 iterations, 1000 ms each, 1000 calls per op
     * # Timeout: 10 min per iteration
     * # Threads: 1024 threads, ***WARNING: Synchronize iterations are disabled!***
     * # Benchmark mode: Throughput, ops/time
     * # Benchmark: org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeIntegerTest.testNewGetAndIncrementPerformance
     *
     * # Run progress: 0.00% complete, ETA 00:01:10
     * # Fork: 1 of 1
     * # Warmup Iteration   1: 2078993549.108 ops/s
     * # Warmup Iteration   2: 6408026002.297 ops/s
     * # Warmup Iteration   3: 5455960135.636 ops/s
     * Iteration   1: 165330.972 ops/s
     * Iteration   2: 95420.526 ops/s
     * Iteration   3: 173340.089 ops/s
     * Iteration   4: 94214.669 ops/s
     * Iteration   5: 261606.088 ops/s
     *
     *
     * Result "org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeIntegerTest.testNewGetAndIncrementPerformance":
     *   157982.469 ±(99.9%) 265443.465 ops/s [Average]
     *   (min, avg, max) = (94214.669, 157982.469, 261606.088), stdev = 68934.825
     *   CI (99.9%): [≈ 0, 423425.934] (assumes normal distribution)
     *
     *
     * # JMH version: 1.21
     * # VM version: JDK 1.8.0_111, Java HotSpot(TM) 64-Bit Server VM, 25.111-b14
     * # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/bin/java
     * # VM options: -Dfile.encoding=UTF-8
     * # Warmup: 3 iterations, 10 s each
     * # Measurement: 5 iterations, 1000 ms each, 1000 calls per op
     * # Timeout: 10 min per iteration
     * # Threads: 1024 threads, ***WARNING: Synchronize iterations are disabled!***
     * # Benchmark mode: Throughput, ops/time
     * # Benchmark: org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeIntegerTest.testOriGetAndIncrementPerformance
     *
     * # Run progress: 50.00% complete, ETA 00:00:43
     * # Fork: 1 of 1
     * # Warmup Iteration   1: 3345520433.355 ops/s
     * # Warmup Iteration   2: 4823749249.799 ops/s
     * # Warmup Iteration   3: 6676209367.819 ops/s
     * Iteration   1: 34885.954 ops/s
     * Iteration   2: 33128.147 ops/s
     * Iteration   3: 31300.865 ops/s
     * Iteration   4: 19188.602 ops/s
     * Iteration   5: 34664.282 ops/s
     *
     *
     * Result "org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeIntegerTest.testOriGetAndIncrementPerformance":
     *   30633.570 ±(99.9%) 25249.253 ops/s [Average]
     *   (min, avg, max) = (19188.602, 30633.570, 34885.954), stdev = 6557.151
     *   CI (99.9%): [5384.317, 55882.822] (assumes normal distribution)
     *
     *
     * # Run complete. Total time: 00:01:26
     *
     * REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on
     * why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial
     * experiments, perform baseline and negative tests that provide experimental control, make sure
     * the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts.
     * Do not assume the numbers tell you what you want them to tell.
     *
     * Benchmark                                                  Mode  Cnt       Score        Error  Units
     * AtomicRangeIntegerTest.testNewGetAndIncrementPerformance  thrpt    5  157982.469 ± 265443.465  ops/s
     * AtomicRangeIntegerTest.testOriGetAndIncrementPerformance  thrpt    5   30633.570 ±  25249.253  ops/s
     */
2019-06-15 13:43:36 +08:00
zhangwei bfd46151ad Replace add with addAll, reduce the invoke time a little. (#2766) 2019-05-27 23:08:11 +08:00
SataQiu 1f39b19937 fix some spelling mistakes (#2615) 2019-05-07 11:40:35 +08:00
Ming Deng 16103c6738 Using PowerMockito to mock System.getent; (#2593)
* Using PowerMockito rathen then using reflection to mock System.getent;

* Run Test

* Trigger CI only on the master
2019-05-07 10:32:43 +08:00
Ming Deng e044fe26cd Add unit test for ConsumerPoolFactory, EnvUtil (#2497)
* 1. add unit test for ConsumerPoolFactory, EnvUtil;
2. fix the bug that Env.getLong invoking the Integer.parseInt;

* Add file header
2019-04-20 11:31:15 +08:00
吴晟 Wu Sheng 58cf5936e6 Improve OAP cluster performance (#2271)
* Refactor for cluster mode.

* Make send to L2 in certain cycle.
2019-02-21 16:33:07 +08:00
吴晟 Wu Sheng c019535ee9
Fix mesh telemetry performance issue and adjust default thread number (#2261)
* Try adjustment.

* Remove heartbeat.

* Make heartbeat back to work. And default threadpool size more sense.

* Make L2 to less than before.

* Make instance heartbeat works.

* Try L1 aggregation thread = core * 2 * 2.
2019-02-20 08:29:17 +08:00
吴晟 Wu Sheng 2f3ccf368c
Backend streaming thread model improvement (#2247)
[Performance Improvement]Backend streaming thread model improvement
2019-02-18 14:55:07 +08:00
吴晟 Wu Sheng b86426c9a2 Add consumer pool to Datacarrier (#2245)
* Extend consume pool to data carrier.

* Change indicator aggregate worker and persistent worker to use default consumer pool.

* Fix CI.
2019-02-13 23:19:47 +08:00
吴晟 Wu Sheng 8cd327d8bb
Revert #1790 reset feature and provide default alarm settings. (#1833)
* Revert reset feature.

* Set default dist alarm settings and make dist package setting files right.

* Support empty list.
2018-10-28 22:28:21 +08:00
刘新元 Liu XinYuan b11d479337 Add service and instance reset function (#1790)
* Manually trigger agent registration and write registration status to file

* Delete unused variables

* Code optimization, encapsulating some methods

* add clear DataCarrier function

* revert SkyWalkingAgent

* Optimize code and logic, including updating applicatin_id in unRegisterOperationNames

* Server end metadata loss notification

* Server end metadata loss notification

* fix file stream close and other problem

* revert to old

* fix some bug

Signed-off-by: Liu-XinYuan <879928098@qq.com>

* fix some bugs in agent reset

* add close inputStream and fileChannel and fix some bug

* fixed some bugs
2018-10-27 19:58:15 +08:00
吴晟 Wu Sheng d9556c38fc
Make Mesh and Istio receivers ready (#1821)
* Make receiver more effective

* Add Istio test case and all source dispatch in

* Refactor mock data

* FIx rat.

* Support call component.

* Fix ThermodynamicIndicator bug.

* Fix test cases.

* Fix missing calculate in db merging.

* Add codes for debug.

* 1. Fixed elasticsearch bulk process not fresh bug. (#1819)

2. Fixed the bug of source register no queue but wait the end for batch tag.

* Remove debug log, and restore TTL timer for real scenarios.
2018-10-26 15:17:33 +08:00
wu-sheng 158b6ff884 Fixing javadoc. And try to trigger a ci fail in this commit, in order to make sure javadoc will be checked in further pull request. 2018-02-26 09:15:10 +08:00
wu-sheng 6e152b4fb0 Move `apm-network` module under the new root module `apm-protocol`. And add `apm-ui-query` under the `apm-protocol` module. 2017-12-25 09:51:26 +08:00
wu-sheng 678f30097b Support to set consume cycle. And invoke the existed callbacks when the message blocked at first time. 2017-12-20 14:30:15 +08:00
wusheng 15328202b8 Revove duplicate license headers. 2017-12-11 15:04:26 +08:00
wusheng 05b818e709 Update package name to org.apache.skywalking 2017-12-10 16:32:39 +08:00
wusheng 23133f7d97 Update copyright to Apache Foundation. 2017-12-09 23:38:32 +08:00
peng-yongsheng eaa0254512 Test success with standalone and cluster mode. 2017-11-19 22:25:11 +08:00
wu-sheng e9a74c85bb Fix a test case. 2017-11-01 15:12:27 +08:00
peng-yongsheng fdb1dc69f5 Check style error 2017-10-13 14:41:16 +08:00
wusheng c4098a23f9 Revert "Support javadoc generation."
This reverts commit 5c56d41aa2.
2017-10-12 22:43:43 +08:00
wusheng 5c56d41aa2 Support javadoc generation. 2017-10-12 21:43:10 +08:00
peng-yongsheng 52f1420670 Add copyright head in all java files and copyright head check style 2017-10-10 22:27:57 +08:00
wusheng 4fda33b16c Support retry when use IF_POSSIBLE strategy. 2017-07-28 21:10:14 +08:00
wusheng cba4dc2883 Make sure the JVM stop hook works #295 2017-07-18 21:47:24 +08:00
ascrutae 8143a5b096 independent data carrier project 2017-07-14 10:07:17 +08:00