Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
e99f2d2d
Commit
e99f2d2d
authored
19 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add function to report delta time as part of event timing functions.
parent
33b11c4d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/slurmctld/proc_req.c
+14
-0
14 additions, 0 deletions
src/slurmctld/proc_req.c
src/slurmctld/proc_req.h
+10
-0
10 additions, 0 deletions
src/slurmctld/proc_req.h
with
24 additions
and
0 deletions
src/slurmctld/proc_req.c
+
14
−
0
View file @
e99f2d2d
...
@@ -125,6 +125,20 @@ inline void diff_tv_str(struct timeval *tv1,struct timeval *tv2,
...
@@ -125,6 +125,20 @@ inline void diff_tv_str(struct timeval *tv1,struct timeval *tv2,
info
(
"Warning: Note very large processing time: %s"
,
tv_str
);
info
(
"Warning: Note very large processing time: %s"
,
tv_str
);
}
}
/*
* diff_tv - return the difference between two times
* IN tv1 - start of event
* IN tv2 - end of event
* RET time in micro-seconds
*/
inline
long
diff_tv
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
)
{
long
delta_t
;
delta_t
=
(
tv2
->
tv_sec
-
tv1
->
tv_sec
)
*
1000000
;
delta_t
+=
tv2
->
tv_usec
-
tv1
->
tv_usec
;
return
delta_t
;
}
/*
/*
* slurmctld_req - Process an individual RPC request
* slurmctld_req - Process an individual RPC request
* IN/OUT msg - the request message, data associated with the message is freed
* IN/OUT msg - the request message, data associated with the message is freed
...
...
This diff is collapsed.
Click to expand it.
src/slurmctld/proc_req.h
+
10
−
0
View file @
e99f2d2d
...
@@ -38,11 +38,13 @@
...
@@ -38,11 +38,13 @@
# define START_TIMER gettimeofday(&tv1, NULL)
# define START_TIMER gettimeofday(&tv1, NULL)
# define END_TIMER gettimeofday(&tv2, NULL); \
# define END_TIMER gettimeofday(&tv2, NULL); \
diff_tv_str(&tv1, &tv2, tv_str, 20)
diff_tv_str(&tv1, &tv2, tv_str, 20)
# define DELTA_TIMER diff_tv(&tv1, &tv2)
# define TIME_STR tv_str
# define TIME_STR tv_str
#else
#else
# define DEF_TIMERS int tv1, tv2, tv_str
# define DEF_TIMERS int tv1, tv2, tv_str
# define START_TIMER tv1 = 0
# define START_TIMER tv1 = 0
# define END_TIMER tv2 = tv_str = 0
# define END_TIMER tv2 = tv_str = 0
# define DELTA_TIMER 0L
# define TIME_STR ""
# define TIME_STR ""
#endif
#endif
...
@@ -56,6 +58,14 @@
...
@@ -56,6 +58,14 @@
extern
inline
void
diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
extern
inline
void
diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
char
*
tv_str
,
int
len_tv_str
);
char
*
tv_str
,
int
len_tv_str
);
/*
* diff_tv - return the difference between two times
* IN tv1 - start of event
* IN tv2 - end of event
* RET time in micro-seconds
*/
inline
long
diff_tv
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
);
/*
/*
* slurmctld_req - Process an individual RPC request
* slurmctld_req - Process an individual RPC request
* IN/OUT msg - the request message, data associated with the message is freed
* IN/OUT msg - the request message, data associated with the message is freed
...
...
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