Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
is
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas-tdaq-software
is
Compare revisions
a3cee7c87419558cc49e84a80427224e61f14e16 to 17502279cb1373484a6c923dc40aa520c1a27ec4
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
atlas-tdaq-software/is
Select target project
No results found
17502279cb1373484a6c923dc40aa520c1a27ec4
Select Git revision
Swap
Target
atlas-tdaq-software/is
Select target project
wittgen/is
ssnyder/is
atlas-tdaq-software/is
3 results
a3cee7c87419558cc49e84a80427224e61f14e16
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
Fix syntax error
· f83b7117
Serguei Kolos
authored
3 years ago
f83b7117
Get rid of the unused parameter warning
· 53d22cf3
Serguei Kolos
authored
3 years ago
53d22cf3
Reduce repository locking time when creating info stream
· 17502279
Serguei Kolos
authored
3 years ago
17502279
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/create_info.cc
+1
-1
1 addition, 1 deletion
examples/create_info.cc
is/infodynany.h
+2
-1
2 additions, 1 deletion
is/infodynany.h
is/server/streamhelper.h
+1
-0
1 addition, 0 deletions
is/server/streamhelper.h
server/streamhelper.cc
+44
-34
44 additions, 34 deletions
server/streamhelper.cc
with
48 additions
and
36 deletions
examples/create_info.cc
View file @
17502279
...
...
@@ -136,7 +136,7 @@ int main(int argc, char ** argv)
CmdLine
cmd
(
*
argv
,
&
partition_name
,
&
server_name
,
&
person_name
,
&
employee_name
,
NULL
);
CmdArgvIter
arg_iter
(
--
argc
,
++
argv
);
cmd
.
description
(
"This program implements f
a
nctionality tests for the Information Service.
\n
"
cmd
.
description
(
"This program implements f
u
nctionality tests for the Information Service.
\n
"
"It creates, updates and deletes information objects."
);
// Parse arguments
...
...
This diff is collapsed.
Click to expand it.
is/infodynany.h
View file @
17502279
...
...
@@ -307,6 +307,7 @@ ISInfoDynAny::setAttributeValue( const std::string & name, const T & value )
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
ISInfoDynAny
&
val
)
{
std
::
vector
<
int
,
std
::
allocator
<
int
>>
ii
;
return
val
.
print
(
out
);
}
...
...
@@ -327,7 +328,7 @@ namespace std {
;
}
void
deallocate
(
ISInfoDynAny
*
p
,
std
::
size_t
n
)
{
void
deallocate
(
ISInfoDynAny
*
p
,
std
::
size_t
)
{
::
operator
delete
(
p
);
}
...
...
This diff is collapsed.
Click to expand it.
is/server/streamhelper.h
View file @
17502279
...
...
@@ -49,6 +49,7 @@ private:
static
const
size_t
m_max_length
;
ISRepository
&
m_repository
;
std
::
vector
<
boost
::
shared_ptr
<
ISInfoHolder
>>
m_selected
;
ISCriteriaHelper
m_criteria
;
is
::
stream_var
m_stream
;
const
std
::
string
m_stream_id
;
...
...
This diff is collapsed.
Click to expand it.
server/streamhelper.cc
View file @
17502279
...
...
@@ -49,46 +49,56 @@ void
ISStreamHelper
::
fill
()
{
ERS_LOG
(
"creating "
<<
m_stream_id
<<
" with history_depth = "
<<
m_history_depth
);
const
ISInfoSet
*
set
;
{
ISRepository
::
DataLock
data_lock
(
m_repository
,
set
);
ERS_DEBUG
(
1
,
"Acquired data lock for "
<<
m_stream_id
);
m_selected
.
reserve
(
set
->
size
());
for
(
ISInfoSetSorted
::
const_iterator
it
=
set
->
get
<
1
>
().
begin
();
it
!=
set
->
get
<
1
>
().
end
();
++
it
)
{
if
(
m_criteria
.
match
((
*
it
)
->
name
(),
(
*
it
)
->
type
()))
{
m_selected
.
push_back
(
*
it
);
}
}
}
ERS_DEBUG
(
1
,
m_stream_id
<<
" data lock was released"
);
boost
::
thread
send_thread
(
boost
::
bind
(
&
ISStreamHelper
::
send
,
this
));
m_buffers
[
0
]
=
new
is
::
info_list
(
m_max_length
,
0
,
new
is
::
info_history
[
m_max_length
]);
m_buffers
[
1
]
=
new
is
::
info_list
(
m_max_length
,
0
,
new
is
::
info_history
[
m_max_length
]);
const
ISInfoSet
*
set
;
size_t
length
=
0
;
for
(
const
auto
&
info
:
m_selected
)
{
ISRepository
::
DataLock
data_lock
(
m_repository
,
set
);
ERS_DEBUG
(
1
,
"Acquired data lock for "
<<
m_stream_id
);
size_t
length
=
0
;
for
(
ISInfoSetSorted
::
const_iterator
it
=
set
->
get
<
1
>
().
begin
();
it
!=
set
->
get
<
1
>
().
end
();
++
it
)
{
const
boost
::
shared_ptr
<
ISInfoHolder
>
&
info
=
*
it
;
if
(
m_criteria
.
match
(
info
->
name
(),
info
->
type
()))
{
length
+=
push
(
info
);
if
(
length
>=
m_max_length
)
{
ERS_DEBUG
(
1
,
"Buffer is full, let's wait for the sending thread"
);
std
::
unique_lock
lock
(
m_mutex
);
m_condition
.
wait
(
lock
,
[
this
]{
return
m_ready_to_send
;});
}
}
if
(
m_ready_to_send
&&
m_buffers
[
m_fill_buffer
]
->
length
())
{
if
(
m_error
)
{
break
;
}
std
::
unique_lock
lock
(
m_mutex
);
ERS_DEBUG
(
1
,
"IS stream "
<<
m_stream_id
<<
" is ready to send data: "
<<
m_buffers
[
m_fill_buffer
]
->
length
());
m_send_buffer
=
m_fill_buffer
;
m_fill_buffer
=
!
m_send_buffer
;
m_ready_to_send
=
false
;
length
=
0
;
m_condition
.
notify_one
();
}
}
length
+=
push
(
info
);
if
(
length
>=
m_max_length
)
{
ERS_DEBUG
(
1
,
"Buffer is full, let's wait for the sending thread"
);
std
::
unique_lock
lock
(
m_mutex
);
m_condition
.
wait
(
lock
,
[
this
]{
return
m_ready_to_send
;});
}
if
(
m_ready_to_send
&&
m_buffers
[
m_fill_buffer
]
->
length
())
{
if
(
m_error
)
{
break
;
}
std
::
unique_lock
lock
(
m_mutex
);
ERS_DEBUG
(
1
,
"IS stream "
<<
m_stream_id
<<
" is ready to send data: "
<<
m_buffers
[
m_fill_buffer
]
->
length
());
m_send_buffer
=
m_fill_buffer
;
m_fill_buffer
=
!
m_send_buffer
;
m_ready_to_send
=
false
;
length
=
0
;
m_condition
.
notify_one
();
}
}
if
(
!
m_error
)
{
std
::
unique_lock
lock
(
m_mutex
);
...
...
This diff is collapsed.
Click to expand it.