-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add PerfUtil.clear()/Bytes.concat()/CollectionUtil.randomSet() #16
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
c1bec28
to
36dfb1c
Compare
"Can't be cleared when the call has not ended yet"); | ||
this.stopwatches.clear(); | ||
} | ||
|
||
public void profilePackage(String... packages) throws | ||
NotFoundException, CannotCompileException, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle alignment
53fac35
to
55d50be
Compare
@@ -68,6 +69,17 @@ | |||
return true; | |||
} | |||
|
|||
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid
3ebd428
to
f58c22d
Compare
@@ -68,6 +69,17 @@ | |||
return true; | |||
} | |||
|
|||
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); |
There was a problem hiding this comment.
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
Change-Id: Ida64154a0bdee62e281585836c5e7ccfc6061c06