Skip to content

Commit

Permalink
Develop add flush global (#149)
Browse files Browse the repository at this point in the history
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
Signed-off-by: David P. Chassin <david.chassin@me.com>
Signed-off-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
Signed-off-by: Mitchell Victoriano <mitchell.victoriano@gmail.com>
Co-authored-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
Co-authored-by: Mitchell Victoriano <47313912+MitchellAV@users.noreply.github.com>
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
Signed-off-by: David P. Chassin <david.chassin@me.com>
  • Loading branch information
3 people authored and dchassin committed Jan 27, 2024
1 parent 558fc82 commit 57d909b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
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

0 comments on commit 57d909b

Please sign in to comment.