Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mocktage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maestro
mocktage
Commits
02eb054f
Commit
02eb054f
authored
Oct 20, 2021
by
John Biddiscombe
Browse files
Options
Downloads
Patches
Plain Diff
More debug output to try to resolve container issues
parent
a74fcfb4
Branches
cpp-cdo
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cpp/cdo_wrapper.hpp
+16
-4
16 additions, 4 deletions
src/cpp/cdo_wrapper.hpp
src/cpp/process-CDO.cpp
+20
-9
20 additions, 9 deletions
src/cpp/process-CDO.cpp
with
36 additions
and
13 deletions
src/cpp/cdo_wrapper.hpp
+
16
−
4
View file @
02eb054f
...
@@ -22,11 +22,23 @@
...
@@ -22,11 +22,23 @@
#include
<chrono>
#include
<chrono>
#define DEBUG_OUTPUT 1
#define DEBUG_OUTPUT 1
#define DEBUG_LOG(msg) { \
#define DEBUG_TOFILE 0
#if DEBUG_TOFILE
#define DEBUG_FILE(msg) \
{ \
std::filesystem::path home(getenv("HOME")); \
std::filesystem::path home(getenv("HOME")); \
std::ofstream commands(home /= "commands.txt", std::ios_base::app); \
std::ofstream l_commands(home /= "commands.txt", std::ios_base::app); \
commands << "component : " << component_ << std::endl << msg; \
l_commands << component_ << " : " << std::endl << msg; \
std::cout << "component : " << component_ << " : " << msg << std::endl; \
} \
#endif
#else
#define DEBUG_FILE(msg)
#endif
#define DEBUG_LOG(msg) { \
std::cout << component_ << " : " << msg << std::endl; \
DEBUG_FILE(msg) \
}
}
struct
cdo_wrapper
:
std
::
enable_shared_from_this
<
cdo_wrapper
>
struct
cdo_wrapper
:
std
::
enable_shared_from_this
<
cdo_wrapper
>
...
...
This diff is collapsed.
Click to expand it.
src/cpp/process-CDO.cpp
+
20
−
9
View file @
02eb054f
...
@@ -68,7 +68,19 @@ void set_signal_handler()
...
@@ -68,7 +68,19 @@ void set_signal_handler()
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
set_signal_handler
();
std
::
ostringstream
temp1
;
for
(
int
i
=
0
;
i
<
argc
;
i
++
){
temp1
<<
argv
[
i
]
<<
" "
;
}
std
::
cout
<<
temp1
.
str
()
<<
std
::
endl
;
{
std
::
string
component_
(
"unknown"
);
DEBUG_LOG
(
temp1
.
str
());
}
//
//set_signal_handler();
//
//
// Input Argument Handling
// Input Argument Handling
//
//
...
@@ -145,7 +157,7 @@ int main(int argc, char *argv[])
...
@@ -145,7 +157,7 @@ int main(int argc, char *argv[])
// in stager mode, we copy input to output, ignore any outputs set
// in stager mode, we copy input to output, ignore any outputs set
if
(
stagermode
)
{
if
(
stagermode
)
{
if
(
produces
.
size
()
>
0
)
{
if
(
produces
.
size
()
>
0
)
{
DEBUG_LOG
(
"W
ARNING
: Stager mode set, command-line outputs will be ignored"
);
DEBUG_LOG
(
"W
arning
: Stager mode set, command-line outputs will be ignored"
);
}
}
produces
=
consumes
;
produces
=
consumes
;
for
(
auto
&
p
:
produces
)
{
for
(
auto
&
p
:
produces
)
{
...
@@ -162,6 +174,7 @@ int main(int argc, char *argv[])
...
@@ -162,6 +174,7 @@ int main(int argc, char *argv[])
#if DEBUG_OUTPUT
#if DEBUG_OUTPUT
std
::
stringstream
temp
;
std
::
stringstream
temp
;
temp
<<
"
\n
"
;
temp
<<
"------------- "
<<
component_
<<
"
\n
"
;
temp
<<
"------------- "
<<
component_
<<
"
\n
"
;
temp
<<
"component : "
<<
component_
<<
"
\n
"
;
temp
<<
"component : "
<<
component_
<<
"
\n
"
;
...
@@ -187,11 +200,7 @@ int main(int argc, char *argv[])
...
@@ -187,11 +200,7 @@ int main(int argc, char *argv[])
temp
<<
"watcher : "
<<
watchermode
<<
"
\n
"
;
temp
<<
"watcher : "
<<
watchermode
<<
"
\n
"
;
temp
<<
"stager : "
<<
stagermode
<<
"
\n
"
;
temp
<<
"stager : "
<<
stagermode
<<
"
\n
"
;
temp
<<
"------------- "
<<
component_
<<
"
\n
"
;
temp
<<
"------------- "
<<
component_
<<
"
\n
"
;
{
DEBUG_LOG
(
temp
.
str
());
std
::
ofstream
commands
(
"/home/biddisco/commands.txt"
,
std
::
ios_base
::
app
);
commands
<<
temp
.
str
();
}
std
::
cout
<<
temp
.
str
();
#endif
#endif
// stop file already present
// stop file already present
...
@@ -199,9 +208,10 @@ int main(int argc, char *argv[])
...
@@ -199,9 +208,10 @@ int main(int argc, char *argv[])
mocktage_read_pminfo_file
(
pminfo
.
c_str
());
mocktage_read_pminfo_file
(
pminfo
.
c_str
());
DEBUG_LOG
(
"Calling mstro_init"
);
mstro_status
result
=
mstro_init
(
"mocktage"
,
component_
.
c_str
(),
0
);
mstro_status
result
=
mstro_init
(
"mocktage"
,
component_
.
c_str
(),
0
);
if
(
result
!=
MSTRO_OK
)
{
if
(
result
!=
MSTRO_OK
)
{
printf
(
"Error
\n
"
);
DEBUG_LOG
(
"Error mstro_init
"
);
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
...
@@ -225,6 +235,7 @@ int main(int argc, char *argv[])
...
@@ -225,6 +235,7 @@ int main(int argc, char *argv[])
// async wait on all of the consumed CDOs
// async wait on all of the consumed CDOs
for
(
auto
&
t
:
threads
)
{
for
(
auto
&
t
:
threads
)
{
DEBUG_LOG
(
"getting future"
);
shared_cdo
cdo
=
t
.
get
();
shared_cdo
cdo
=
t
.
get
();
if
(
stagermode
)
{
if
(
stagermode
)
{
cached_data_map
.
insert
(
std
::
make_pair
(
cdo
->
name_
,
cdo
->
deep_copy_data
())
);
cached_data_map
.
insert
(
std
::
make_pair
(
cdo
->
name_
,
cdo
->
deep_copy_data
())
);
...
...
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
sign in
to comment