Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
idealvin committed Sep 4, 2024
1 parent d7e40f5 commit b630592
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fastring randstr(const char* s, int n) {
const uint32 mask = _get_mask(len);
const uint32 step = (uint32)::ceil(1.6 * (mask * n) / len);
fastring bytes(god::align_up<4>(step));
fastring res(n);
fastring res(n + 1);
int pos = 0;

res.resize(n);
Expand Down
6 changes: 6 additions & 0 deletions test/bm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ BM_group(rand) {
x = co::rand(seed);
);
BM_use(x);

fastring s;
BM_add(co::randstr)(
s = co::randstr();
);
BM_use(s);
}

BM_group(malloc) {
Expand Down
4 changes: 2 additions & 2 deletions test/so/rpc/hello_again.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package xx

service HelloAgain {
hello,
again,
hello
again
}
4 changes: 2 additions & 2 deletions test/so/rpc/hello_world.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package xx

service HelloWorld {
hello,
world,
hello
world
}

0 comments on commit b630592

Please sign in to comment.