Skip to content
Open
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
9 changes: 5 additions & 4 deletions profiler/Profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def summary(self) -> dict:
total_write = self.result['log']['total_write_bytes'][-1]
max_threads = max(self.result['log']['num_threads'])

return {"status":status, "start_time":start_time, "end_time":end_time, "duration":duration, "highest_commit":highest_commit, "total_read":total_read, "total_write":total_write, "max_threads":max_threads}
return {"status":status, "command":self.command, "start_time":start_time, "end_time":end_time, "duration":duration, "highest_commit":highest_commit, "total_read":total_read, "total_write":total_write, "max_threads":max_threads}

def readLog(log_filename, filter=None):
ret = {"time":[], "text":[]}
Expand Down Expand Up @@ -512,7 +512,8 @@ def VisualizeExperiments(experiments, show_figure:bool=True, vgroups=[("cpu_perc
colors = []
labels = []
for i, exp in enumerate(experiments):
colors.append(Category10[10][i])
color_index = i % 9
colors.append(Category10[10][color_index])
fldrname, filename = getExperimentFileName(exp)
labels.append(filename[:-4])

Expand Down Expand Up @@ -560,8 +561,8 @@ def VisualizeExperiments(experiments, show_figure:bool=True, vgroups=[("cpu_perc
for i, exp in enumerate(experiments):
if not exp:
continue
color = Category10[10][i]
color_index = i % 9
color = Category10[10][color_index]

fldrname, filename = getExperimentFileName(exp)
if type(vgroup[0]) is tuple: # do something with this vgroup case
Expand Down
21 changes: 17 additions & 4 deletions tic/dll/src/stg/AbstrStoragemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
#include "TreeItemContextHandle.h"
#include "TreeItemProps.h"
#include "stg/StorageClass.h"

#include <windows.h>
#include "processenv.h"

#if defined(MG_DEBUG)
#define MG_DEBUG_ASM 1
Expand Down Expand Up @@ -196,6 +197,16 @@ SharedStr GetRegConfigSetting(const TreeItem* configRoot, CharPtr key, CharPtr d
return SharedStr(defaultValue);
}

auto GetEnvironmentSetting(CharPtr placeHolder) -> SharedStr
{
const UInt64 buffer_size = 512;
char buffer[buffer_size];
auto number_of_characters_in_buffer = GetEnvironmentVariableA("SourceDataDir", buffer, buffer_size);
if (number_of_characters_in_buffer > 0)
return SharedStr(buffer, buffer+number_of_characters_in_buffer);
return {};
}

SharedStr GetConvertedRegConfigSetting(const TreeItem* configRoot, CharPtr key, CharPtr defaultValue)
{
return ConvertDosFileName(GetRegConfigSetting(configRoot, key, defaultValue));
Expand Down Expand Up @@ -390,20 +401,22 @@ SharedStr GetPlaceholderValue(CharPtr subDirName, CharPtr placeHolder, bool must
throwErrorD("Unknown placeholder", placeHolder);
return SharedStr();
}

SharedStr GetPlaceholderValue(const TreeItem* configStore, CharPtr placeHolder)
{
if (!stricmp(placeHolder, "caseDir")) return GetCaseDir (configStore);
if (!stricmp(placeHolder, "storageBaseName" )) return GetStorageBaseName(configStore);
if (!stricmp(placeHolder, "currDir")) return SharedStr( SessionData::Curr()->GetConfigLoadDir() );

if (!stricmp(placeHolder, "sourceDataProjDir")) return GetSourceDataProjDir(SessionData::Curr()->GetConfigRoot());
if (!stricmp(placeHolder, "dataDir" )) return GetDataDir (SessionData::Curr()->GetConfigRoot());

SharedStr result = GetPlaceholderValue(SessionData::Curr()->GetConfigDir().c_str(), placeHolder, false);
auto result = GetEnvironmentSetting(placeHolder);
if (!result.empty())
return result;

result = GetPlaceholderValue(SessionData::Curr()->GetConfigDir().c_str(), placeHolder, false);
if (!result.empty())
return result;
//ss
result = GetConvertedRegConfigSetting(SessionData::Curr()->GetConfigRoot(), placeHolder, "");
if (!result.empty())
return result;
Expand Down