Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
cd8fea9d
Commit
cd8fea9d
authored
Sep 20, 2023
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
bench: adapt for new API
Change-Id: I48a3a29d95ca2d56ce55864f3417a1f3d8c1bb57
parent
2f35d7f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/benchmark/main.cpp
+5
-5
5 additions, 5 deletions
tools/benchmark/main.cpp
with
5 additions
and
5 deletions
tools/benchmark/main.cpp
+
5
−
5
View file @
cd8fea9d
...
@@ -32,7 +32,7 @@ std::unique_ptr<ConnectionHandler>
...
@@ -32,7 +32,7 @@ std::unique_ptr<ConnectionHandler>
setupHandler
(
const
std
::
string
&
name
,
setupHandler
(
const
std
::
string
&
name
,
std
::
shared_ptr
<
asio
::
io_context
>
ioContext
,
std
::
shared_ptr
<
asio
::
io_context
>
ioContext
,
std
::
shared_ptr
<
std
::
thread
>
ioContextRunner
,
std
::
shared_ptr
<
std
::
thread
>
ioContextRunner
,
std
::
unique
_ptr
<
IceTransportFactory
>
&
factory
,
std
::
shared
_ptr
<
IceTransportFactory
>
factory
,
std
::
shared_ptr
<
Logger
>
logger
)
std
::
shared_ptr
<
Logger
>
logger
)
{
{
auto
h
=
std
::
make_unique
<
ConnectionHandler
>
();
auto
h
=
std
::
make_unique
<
ConnectionHandler
>
();
...
@@ -66,9 +66,9 @@ setupHandler(const std::string& name,
...
@@ -66,9 +66,9 @@ setupHandler(const std::string& name,
config
->
dht
=
h
->
dht
;
config
->
dht
=
h
->
dht
;
config
->
id
=
h
->
id
;
config
->
id
=
h
->
id
;
config
->
ioContext
=
h
->
ioContext
;
config
->
ioContext
=
h
->
ioContext
;
config
->
factory
=
factory
.
get
()
;
config
->
factory
=
factory
;
config
->
logger
=
logger
;
config
->
logger
=
logger
;
config
->
certStore
=
h
->
certStore
.
get
()
;
config
->
certStore
=
h
->
certStore
;
std
::
filesystem
::
path
currentPath
=
std
::
filesystem
::
current_path
();
std
::
filesystem
::
path
currentPath
=
std
::
filesystem
::
current_path
();
std
::
filesystem
::
path
tempDirPath
=
currentPath
/
"temp"
;
std
::
filesystem
::
path
tempDirPath
=
currentPath
/
"temp"
;
...
@@ -89,7 +89,7 @@ struct BenchResult {
...
@@ -89,7 +89,7 @@ struct BenchResult {
BenchResult
BenchResult
runBench
(
std
::
shared_ptr
<
asio
::
io_context
>
ioContext
,
runBench
(
std
::
shared_ptr
<
asio
::
io_context
>
ioContext
,
std
::
shared_ptr
<
std
::
thread
>
ioContextRunner
,
std
::
shared_ptr
<
std
::
thread
>
ioContextRunner
,
std
::
unique
_ptr
<
IceTransportFactory
>&
factory
,
std
::
shared
_ptr
<
IceTransportFactory
>&
factory
,
std
::
shared_ptr
<
Logger
>
logger
)
std
::
shared_ptr
<
Logger
>
logger
)
{
{
BenchResult
ret
;
BenchResult
ret
;
...
@@ -172,7 +172,7 @@ bench()
...
@@ -172,7 +172,7 @@ bench()
{
{
std
::
shared_ptr
<
Logger
>
logger
;
// = dht::log::getStdLogger();
std
::
shared_ptr
<
Logger
>
logger
;
// = dht::log::getStdLogger();
auto
factory
=
std
::
make_
unique
<
IceTransportFactory
>
(
logger
);
auto
factory
=
std
::
make_
shared
<
IceTransportFactory
>
(
logger
);
auto
ioContext
=
std
::
make_shared
<
asio
::
io_context
>
();
auto
ioContext
=
std
::
make_shared
<
asio
::
io_context
>
();
auto
ioContextRunner
=
std
::
make_shared
<
std
::
thread
>
([
context
=
ioContext
]()
{
auto
ioContextRunner
=
std
::
make_shared
<
std
::
thread
>
([
context
=
ioContext
]()
{
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment