Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
David Barchiesi
OpenLDAP
Commits
c22f10f4
Commit
c22f10f4
authored
22 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
don't count operations per request if back-monitor is not built
parent
b7729877
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
servers/slapd/connection.c
+12
-1
12 additions, 1 deletion
servers/slapd/connection.c
servers/slapd/init.c
+3
-1
3 additions, 1 deletion
servers/slapd/init.c
servers/slapd/proto-slap.h
+3
-1
3 additions, 1 deletion
servers/slapd/proto-slap.h
servers/slapd/slap.h
+2
-0
2 additions, 0 deletions
servers/slapd/slap.h
with
20 additions
and
3 deletions
servers/slapd/connection.c
+
12
−
1
View file @
c22f10f4
...
...
@@ -909,19 +909,26 @@ void connection_done( Connection *c )
* calls the appropriate stub to handle it.
*/
#ifdef SLAPD_MONITOR
#define INCR_OP(var,index) \
do { \
ldap_pvt_thread_mutex_lock( &num_ops_mutex ); \
(var)[(index)]++; \
ldap_pvt_thread_mutex_unlock( &num_ops_mutex ); \
} while (0)
#else
/* !SLAPD_MONITOR */
#define INCR_OP(var,index)
#endif
/* !SLAPD_MONITOR */
static
void
*
connection_operation
(
void
*
arg_v
)
{
int
rc
;
struct
co_arg
*
arg
=
arg_v
;
ber_tag_t
tag
=
arg
->
co_op
->
o_tag
,
oldtag
=
tag
;
ber_tag_t
tag
=
arg
->
co_op
->
o_tag
;
#ifdef SLAPD_MONITOR
ber_tag_t
oldtag
=
tag
;
#endif
/* SLAPD_MONITOR */
Connection
*
conn
=
arg
->
co_conn
;
ldap_pvt_thread_mutex_lock
(
&
num_ops_mutex
);
...
...
@@ -1011,12 +1018,15 @@ connection_operation( void *arg_v )
break
;
}
#ifdef SLAPD_MONITOR
oldtag
=
tag
;
#endif
/* SLAPD_MONITOR */
if
(
rc
==
SLAPD_DISCONNECT
)
tag
=
LBER_ERROR
;
operations_error:
ldap_pvt_thread_mutex_lock
(
&
num_ops_mutex
);
num_ops_completed
++
;
#ifdef SLAPD_MONITOR
switch
(
oldtag
)
{
case
LDAP_REQ_BIND
:
num_ops_completed_
[
SLAP_OP_BIND
]
++
;
...
...
@@ -1049,6 +1059,7 @@ operations_error:
num_ops_completed_
[
SLAP_OP_EXTENDED
]
++
;
break
;
}
#endif
/* SLAPD_MONITOR */
ldap_pvt_thread_mutex_unlock
(
&
num_ops_mutex
);
ldap_pvt_thread_mutex_lock
(
&
conn
->
c_mutex
);
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/init.c
+
3
−
1
View file @
c22f10f4
...
...
@@ -44,9 +44,11 @@ ldap_pvt_thread_mutex_t passwd_mutex;
#endif
unsigned
long
num_ops_initiated
=
0
;
unsigned
long
num_ops_initiated_
[
SLAP_OP_LAST
];
unsigned
long
num_ops_completed
=
0
;
#ifdef SLAPD_MONITOR
unsigned
long
num_ops_initiated_
[
SLAP_OP_LAST
];
unsigned
long
num_ops_completed_
[
SLAP_OP_LAST
];
#endif
/* SLAPD_MONITOR */
ldap_pvt_thread_mutex_t
num_ops_mutex
;
unsigned
long
num_entries_sent
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/proto-slap.h
+
3
−
1
View file @
c22f10f4
...
...
@@ -1015,9 +1015,11 @@ LDAP_SLAPD_V (unsigned long) num_refs_sent;
LDAP_SLAPD_V
(
ldap_pvt_thread_mutex_t
)
num_ops_mutex
;
LDAP_SLAPD_V
(
unsigned
long
)
num_ops_completed
;
LDAP_SLAPD_V
(
unsigned
long
)
num_ops_completed_
[
SLAP_OP_LAST
];
LDAP_SLAPD_V
(
unsigned
long
)
num_ops_initiated
;
#ifdef SLAPD_MONITOR
LDAP_SLAPD_V
(
unsigned
long
)
num_ops_completed_
[
SLAP_OP_LAST
];
LDAP_SLAPD_V
(
unsigned
long
)
num_ops_initiated_
[
SLAP_OP_LAST
];
#endif
/* SLAPD_MONITOR */
LDAP_SLAPD_V
(
char
*
)
slapd_pid_file
;
LDAP_SLAPD_V
(
char
*
)
slapd_args_file
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slap.h
+
2
−
0
View file @
c22f10f4
...
...
@@ -1599,6 +1599,7 @@ typedef struct slap_listener {
#define sl_addr sl_sa.sa_in_addr
}
Listener
;
#ifdef SLAPD_MONITOR
/*
* Operation indices
*/
...
...
@@ -1615,6 +1616,7 @@ enum {
SLAP_OP_EXTENDED
,
SLAP_OP_LAST
};
#endif
/* SLAPD_MONITOR */
LDAP_END_DECL
...
...
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