Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Comments

add PerfUtil.clear()/Bytes.concat()/CollectionUtil.randomSet()#16

Merged
Linary merged 1 commit intomasterfrom
perf-util-clear
Mar 1, 2019
Merged

add PerfUtil.clear()/Bytes.concat()/CollectionUtil.randomSet()#16
Linary merged 1 commit intomasterfrom
perf-util-clear

Conversation

@javeme
Copy link
Contributor

@javeme javeme commented Feb 27, 2019

Change-Id: Ida64154a0bdee62e281585836c5e7ccfc6061c06

@codecov
Copy link

codecov bot commented Feb 27, 2019

Codecov Report

Merging #16 into master will increase coverage by 30.91%.
The diff coverage is 89.18%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #16       +/-   ##
============================================
+ Coverage     31.39%   62.3%   +30.91%     
- Complexity      192     347      +155     
============================================
  Files            43      43               
  Lines          1360    1377       +17     
  Branches        210     213        +3     
============================================
+ Hits            427     858      +431     
+ Misses          878     420      -458     
- Partials         55      99       +44
Impacted Files Coverage Δ Complexity Δ
...ava/com/baidu/hugegraph/version/CommonVersion.java 50% <ø> (ø) 1 <0> (ø) ⬇️
src/main/java/com/baidu/hugegraph/util/Bytes.java 84.21% <100%> (+4.21%) 10 <1> (+1) ⬆️
...c/main/java/com/baidu/hugegraph/perf/PerfUtil.java 92.02% <100%> (+92.02%) 35 <8> (+35) ⬆️
.../java/com/baidu/hugegraph/util/CollectionUtil.java 83.14% <100%> (+1.43%) 27 <5> (+5) ⬆️
...ain/java/com/baidu/hugegraph/util/NumericUtil.java 78.72% <100%> (+31.91%) 47 <2> (+16) ⬆️
...in/java/com/baidu/hugegraph/testutil/Whitebox.java 48% <100%> (+48%) 4 <1> (+4) ⬆️
.../java/com/baidu/hugegraph/util/ReflectionUtil.java 94.44% <100%> (+94.44%) 19 <0> (+19) ⬆️
...in/java/com/baidu/hugegraph/config/HugeConfig.java 77.27% <63.63%> (+77.27%) 16 <3> (+16) ⬆️
.../main/java/com/baidu/hugegraph/event/EventHub.java 81.69% <0%> (-1.41%) 26% <0%> (-1%)
src/main/java/com/baidu/hugegraph/util/E.java 60% <0%> (+13.33%) 5% <0%> (+1%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bac575...99bd356. Read the comment docs.

}

public void profilePackage(String... packages) throws
NotFoundException, CannotCompileException,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handle alignment

@javeme javeme force-pushed the perf-util-clear branch 7 times, most recently from 53fac35 to 55d50be Compare February 28, 2019 13:25

public static Set<Integer> randomSet(int min, int max, int count) {
E.checkArgument(max > min, "Invalid min/max: %s/%s", min, max);
E.checkArgument(count <= max - min, "Incalid count %s", count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid

@javeme javeme force-pushed the perf-util-clear branch 2 times, most recently from 3ebd428 to f58c22d Compare March 1, 2019 03:41
@javeme javeme changed the title add clear() for PerfUtil add PerfUtil.clear()/Bytes.concat()/CollectionUtil.randomSet() Mar 1, 2019

public static Set<Integer> randomSet(int min, int max, int count) {
E.checkArgument(max > min, "Invalid min/max: %s/%s", min, max);
E.checkArgument(count <= max - min, "Invalid count %s", count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

count > 0

also add some unit tests: HugeConfigTest, PerfUtilTest,
NumericUtilTest, ReflectionUtilTest and TimeUtilTest.

Change-Id: Ida64154a0bdee62e281585836c5e7ccfc6061c06
@javeme javeme force-pushed the perf-util-clear branch from f58c22d to 99bd356 Compare March 1, 2019 08:44
@Linary Linary merged commit 95530cc into master Mar 1, 2019
@Linary Linary deleted the perf-util-clear branch March 1, 2019 12:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants