Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Chen Yisong
benchmark
Commits
6f094ba1
Unverified
Commit
6f094ba1
authored
Jun 01, 2021
by
Norman Heino
Committed by
GitHub
Jun 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix perf counter argument parsing (#1160)
* Fix argument order in StrSplit * Update AUTHORS, CONTRIBUTORS
parent
4ff73496
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
AUTHORS
AUTHORS
+1
-0
CONTRIBUTORS
CONTRIBUTORS
+1
-0
string_util.cc
src/string_util.cc
+1
-1
string_util_gtest.cc
test/string_util_gtest.cc
+2
-2
No files found.
AUTHORS
View file @
6f094ba1
...
@@ -43,6 +43,7 @@ Matt Clarkson <mattyclarkson@gmail.com>
...
@@ -43,6 +43,7 @@ Matt Clarkson <mattyclarkson@gmail.com>
Maxim Vafin <maxvafin@gmail.com>
Maxim Vafin <maxvafin@gmail.com>
MongoDB Inc.
MongoDB Inc.
Nick Hutchinson <nshutchinson@gmail.com>
Nick Hutchinson <nshutchinson@gmail.com>
Norman Heino <norman.heino@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Ori Livneh <ori.livneh@gmail.com>
Ori Livneh <ori.livneh@gmail.com>
Paul Redmond <paul.redmond@gmail.com>
Paul Redmond <paul.redmond@gmail.com>
...
...
CONTRIBUTORS
View file @
6f094ba1
...
@@ -62,6 +62,7 @@ Lei Xu <eddyxu@gmail.com>
...
@@ -62,6 +62,7 @@ Lei Xu <eddyxu@gmail.com>
Matt Clarkson <mattyclarkson@gmail.com>
Matt Clarkson <mattyclarkson@gmail.com>
Maxim Vafin <maxvafin@gmail.com>
Maxim Vafin <maxvafin@gmail.com>
Nick Hutchinson <nshutchinson@gmail.com>
Nick Hutchinson <nshutchinson@gmail.com>
Norman Heino <norman.heino@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Ori Livneh <ori.livneh@gmail.com>
Ori Livneh <ori.livneh@gmail.com>
Pascal Leroy <phl@google.com>
Pascal Leroy <phl@google.com>
...
...
src/string_util.cc
View file @
6f094ba1
...
@@ -169,7 +169,7 @@ std::vector<std::string> StrSplit(const std::string& str, char delim) {
...
@@ -169,7 +169,7 @@ std::vector<std::string> StrSplit(const std::string& str, char delim) {
size_t
first
=
0
;
size_t
first
=
0
;
size_t
next
=
str
.
find
(
delim
);
size_t
next
=
str
.
find
(
delim
);
for
(;
next
!=
std
::
string
::
npos
;
for
(;
next
!=
std
::
string
::
npos
;
first
=
next
+
1
,
next
=
str
.
find
(
first
,
delim
))
{
first
=
next
+
1
,
next
=
str
.
find
(
delim
,
first
))
{
ret
.
push_back
(
str
.
substr
(
first
,
next
-
first
));
ret
.
push_back
(
str
.
substr
(
first
,
next
-
first
));
}
}
ret
.
push_back
(
str
.
substr
(
first
));
ret
.
push_back
(
str
.
substr
(
first
));
...
...
test/string_util_gtest.cc
View file @
6f094ba1
...
@@ -154,8 +154,8 @@ TEST(StringUtilTest, StrSplit) {
...
@@ -154,8 +154,8 @@ TEST(StringUtilTest, StrSplit) {
EXPECT_EQ
(
benchmark
::
StrSplit
(
""
,
','
),
std
::
vector
<
std
::
string
>
{});
EXPECT_EQ
(
benchmark
::
StrSplit
(
""
,
','
),
std
::
vector
<
std
::
string
>
{});
EXPECT_EQ
(
benchmark
::
StrSplit
(
"hello"
,
','
),
EXPECT_EQ
(
benchmark
::
StrSplit
(
"hello"
,
','
),
std
::
vector
<
std
::
string
>
({
"hello"
}));
std
::
vector
<
std
::
string
>
({
"hello"
}));
EXPECT_EQ
(
benchmark
::
StrSplit
(
"hello,there"
,
','
),
EXPECT_EQ
(
benchmark
::
StrSplit
(
"hello,there
,is,more
"
,
','
),
std
::
vector
<
std
::
string
>
({
"hello"
,
"there"
}));
std
::
vector
<
std
::
string
>
({
"hello"
,
"there"
,
"is"
,
"more"
}));
}
}
}
// end namespace
}
// end namespace
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