Remove Profiling in some DAs

This commit is contained in:
2025-04-15 01:22:27 -04:00
parent eb9d45f4bd
commit 79e6fab88e
5 changed files with 12 additions and 70 deletions

View File

@@ -15,7 +15,6 @@ namespace MarketData.DataAccess
// ***********************************************************************************************************
public static bool UpdateCompanyProfile(CompanyProfile companyProfile)
{
Profiler profiler = new Profiler();
MySqlConnection sqlConnection = null;
MySqlTransaction sqlTransaction = null;
MySqlCommand sqlCommand=null;
@@ -67,13 +66,11 @@ namespace MarketData.DataAccess
if(null!=sqlCommand)sqlCommand.Dispose();
if (null != sqlTransaction) sqlTransaction.Dispose();
if (null != sqlConnection) sqlConnection.Close();
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
public static CompanyProfiles GetCompanyProfiles()
{
Profiler profiler = new Profiler();
CompanyProfiles companyProfiles=new CompanyProfiles();
MySqlConnection sqlConnection = null;
MySqlDataReader sqlDataReader = null;
@@ -115,13 +112,11 @@ namespace MarketData.DataAccess
if(null!=sqlCommand)sqlCommand.Dispose();
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
if (null != sqlConnection) sqlConnection.Close();
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
public static CompanyProfile GetCompanyProfile(String symbol)
{
Profiler profiler = new Profiler();
MySqlConnection sqlConnection = null;
MySqlDataReader sqlDataReader = null;
MySqlCommand sqlCommand=null;
@@ -160,14 +155,12 @@ namespace MarketData.DataAccess
if(null!=sqlCommand)sqlCommand.Dispose();
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
if (null != sqlConnection) sqlConnection.Close();
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
// This handles the actual company profile table where we store additional company related informtion
private static bool CompanyProfileDetailsExists(CompanyProfile companyProfile,MySqlConnection sqlConnection,MySqlTransaction sqlTransaction)
{
Profiler profiler = new Profiler();
MySqlDataReader sqlDataReader=null;
MySqlCommand sqlCommand=null;
String strQuery = null;
@@ -193,13 +186,11 @@ namespace MarketData.DataAccess
{
if(null!=sqlCommand)sqlCommand.Dispose();
if(null!=sqlDataReader){sqlDataReader.Close();sqlDataReader.Dispose();}
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
private static bool InsertCompanyProfileDescription(CompanyProfile companyProfile,MySqlConnection sqlConnection,MySqlTransaction sqlTransaction)
{
Profiler profiler = new Profiler();
MySqlCommand sqlCommand=null;
String strQuery = null;
@@ -225,13 +216,11 @@ namespace MarketData.DataAccess
finally
{
if(null!=sqlCommand)sqlCommand.Dispose();
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
private static bool UpdateCompanyProfileDescription(CompanyProfile companyProfile,MySqlConnection sqlConnection,MySqlTransaction sqlTransaction)
{
Profiler profiler = new Profiler();
MySqlCommand sqlCommand=null;
String strQuery = null;
@@ -255,7 +244,6 @@ namespace MarketData.DataAccess
finally
{
if(null!=sqlCommand)sqlCommand.Dispose();
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()}(ms)");
}
}
}