Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flush_output global variable #149

Merged
merged 17 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions module/mysql/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,16 @@ char *database::get_sqldata(char *buffer, size_t size, gld_property &prop, gld_u
default:
return NULL;
}
char tmp[65536];
if ( prop.to_string(tmp,sizeof(tmp)) < (int)size )
{
snprintf(buffer,size,"'%s'",tmp);
}
else
{
snprintf(buffer,size,"NULL");
}
return buffer;
// char tmp[65536];
// if ( prop.to_string(tmp,sizeof(tmp)) < (int)size )
// {
// snprintf(buffer,size,"'%s'",tmp);
// }
// else
// {
// snprintf(buffer,size,"NULL");
// }
// return buffer;
}
void database::start_transaction(void)
{
Expand Down
1 change: 1 addition & 0 deletions source/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ DEPRECATED static struct s_varmap {
{"organization",PT_char32, &global_organization,PA_PUBLIC,"organization name"},
{"profile_output_format",PT_set,&global_profile_output_format,PA_PUBLIC,"profiler output data format"},
{"maximum_runtime",PT_int64,&global_maximum_runtime,PA_PUBLIC,"maximum wall clock runtime allowed"},
{"flush_output",PT_int32,&global_flush_output,PA_PUBLIC,"flush output buffers continuously"},
/* add new global variables here */
};

Expand Down
4 changes: 4 additions & 0 deletions source/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,12 @@ GLOBAL int64 global_rusage_rate INIT(0);
/* Variable: global_rusage_file */
GLOBAL char1024 global_rusage_file INIT("gridlabd-rusage.csv");

/* Variable: global_rusage_data */
GLOBAL char1024 global_rusage_data INIT("{}");

/* Variable: global_flush_output */
GLOBAL int32 global_flush_output INIT(0);

/* Type: PROFILEOUTPUTFORMAT */
typedef enum
{
Expand Down
2 changes: 1 addition & 1 deletion source/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static LOCKVAR output_lock = 0;
static char buffer[65536];
#define CHECK 0xcdcd
int overflow=CHECK;
int flush = 0;
int &flush = global_flush_output;

bool output_enable_flush(bool enable)
{
Expand Down
2 changes: 1 addition & 1 deletion subcommands/gridlabd-version
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function version-check()
# Using curl command to check the version
version_check_response=$(curl -sL "https://version.gridlabd.us/?v=${submitversion}&b=${branch}")
if [[ $version_check_response != '"ok"' ]]; then
warning "Your version is behind. The latest version information is: $version_check_response"
warning "Your version is outdated. The latest version information is: $version_check_response"
exit 0
fi

Expand Down