Skip to content

Commit

Permalink
Metric Graphs Report:
Browse files Browse the repository at this point in the history
- Performance improvements in rendering report for large number of time ranges and large number of entities

Corrected NLog not outputting anything on Linux/Mac systems with .NET Core 2.1 installed by updating NLog package
All around dependencies updates for CSVHelper, EPPlus and NLog
Removed private EPPlus beta dependency from local nuget storage
  • Loading branch information
danielodievich committed Jun 27, 2018
1 parent 2729518 commit 6a98474
Show file tree
Hide file tree
Showing 40 changed files with 509 additions and 1,382 deletions.
12 changes: 6 additions & 6 deletions AppDynamics.Dexter.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="1.9.71" />
<PackageReference Include="CsvHelper" Version="6.0.0" />
<PackageReference Include="EPPlus" Version="4.5.0.1-beta" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="NLog" Version="4.5.0-beta07" />
<PackageReference Include="NLog.Config" Version="4.5.0-beta07" />
<PackageReference Include="NLog.Schema" Version="4.5.0-beta07" />
<PackageReference Include="CsvHelper" Version="7.1.1" />
<PackageReference Include="EPPlus" Version="4.5.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="NLog" Version="4.5.6" />
<PackageReference Include="NLog.Config" Version="4.5.6" />
<PackageReference Include="NLog.Schema" Version="4.5.6" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>

Expand Down
17 changes: 9 additions & 8 deletions AppDynamics.Dexter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,21 @@
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
</Reference>
<Reference Include="CsvHelper, Version=6.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
<HintPath>packages\CsvHelper.6.0.0\lib\net45\CsvHelper.dll</HintPath>
<Reference Include="CsvHelper, Version=7.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
<HintPath>packages\CsvHelper.7.1.1\lib\net45\CsvHelper.dll</HintPath>
</Reference>
<Reference Include="EPPlus, Version=4.5.0.1, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
<HintPath>packages\EPPlus.4.5.0.1-beta\lib\net40\EPPlus.dll</HintPath>
<Reference Include="EPPlus, Version=4.5.2.1, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
<HintPath>packages\EPPlus.4.5.2.1\lib\net40\EPPlus.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>packages\NLog.4.5.0-beta07\lib\net45\NLog.dll</HintPath>
<HintPath>packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
Expand Down Expand Up @@ -278,7 +279,7 @@
</None>
<Content Include="License.txt" />
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<None Include="AppDynamics DEXTER.pfx" />
Expand Down
Binary file modified EPPlus/EPPlus-master.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions Helpers/FileIOHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ public static bool WriteListToCSVFile<T>(List<T> listToWrite, ClassMap<T> classM

public static bool WriteListToCSVFile<T>(List<T> listToWrite, ClassMap<T> classMap, string csvFilePath, bool appendToExistingFile)
{
if (listToWrite == null) return true;

string folderPath = Path.GetDirectoryName(csvFilePath);

if (CreateFolder(folderPath) == true)
Expand Down Expand Up @@ -419,6 +421,8 @@ public static MemoryStream WriteListToMemoryStream<T>(List<T> listToWrite, Class
{
try
{
if (listToWrite == null) return null;

logger.Trace("Writing list with {0} elements containing type {1} to memory stream", listToWrite.Count, typeof(T));

MemoryStream ms = new MemoryStream(1024 * listToWrite.Count);
Expand Down
566 changes: 311 additions & 255 deletions NLog.xsd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
2 changes: 2 additions & 0 deletions ProcessingSteps/Extract/ExtractApplicationAndEntityMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,30 +228,6 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
}
);

//Parallel.ForEach(
// nodesList,
// new ParallelOptions { MaxDegreeOfParallelism = NODE_PROPERTIES_EXTRACT_NUMBER_OF_THREADS },
// () => 0,
// (node, loop, subtotal) =>
// {
// ControllerApi controllerApiLocal = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword));
// controllerApiLocal.PrivateApiLogin();

// string nodePropertiesJSON = controllerApi.GetNodeProperties(node.id);
// if (nodePropertiesJSON != String.Empty) FileIOHelper.SaveFileToPath(nodePropertiesJSON, FilePathMap.NodeRuntimePropertiesDataFilePath(jobTarget, jobConfiguration.Input.TimeRange, node));

// return 1;
// },
// (finalResult) =>
// {
// Interlocked.Add(ref j, finalResult);
// if (j % 10 == 0)
// {
// Console.Write("[{0}].", j);
// }
// }
//);

loggerConsole.Info("Completed {0} Nodes", nodesList.Count);
}

Expand All @@ -261,6 +237,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
1 change: 1 addition & 0 deletions ProcessingSteps/Extract/ExtractSnapshots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);
return false;
}
finally
{
Expand Down
2 changes: 2 additions & 0 deletions ProcessingSteps/Index/IndexApplicationAndEntityFlowmaps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
2 changes: 2 additions & 0 deletions ProcessingSteps/Index/IndexApplicationAndEntityMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
2 changes: 2 additions & 0 deletions ProcessingSteps/Index/IndexEventsAndHealthRuleViolations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
2 changes: 2 additions & 0 deletions ProcessingSteps/Index/IndexSnapshots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
logger.Warn(ex);
loggerConsole.Warn(ex);

return false;
}
finally
{
Expand Down
2 changes: 1 addition & 1 deletion ProcessingSteps/JobStepBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ internal List<MetricExtractMapping> getMetricsExtractMappingList(JobConfiguratio

internal Dictionary<string, List<MethodCallLineClassTypeMapping>> populateMethodCallMappingDictionary(string methodCallLinesToFrameworkTypeMappingFilePath)
{
List<MethodCallLineClassTypeMapping> methodCallLineClassToFrameworkTypeMappingList = FileIOHelper.ReadListFromCSVFile<MethodCallLineClassTypeMapping>(methodCallLinesToFrameworkTypeMappingFilePath, new MethodCallLineClassTypeMappingReportMap());
List<MethodCallLineClassTypeMapping> methodCallLineClassToFrameworkTypeMappingList = FileIOHelper.ReadListFromCSVFile<MethodCallLineClassTypeMapping>(methodCallLinesToFrameworkTypeMappingFilePath, new MethodCallLineClassTypeMappingReportMap());
methodCallLineClassToFrameworkTypeMappingList = methodCallLineClassToFrameworkTypeMappingList.OrderByDescending(m => m.ClassPrefix).ToList();
Dictionary<string, List<MethodCallLineClassTypeMapping>> methodCallLineClassToFrameworkTypeMappingDictionary = new Dictionary<string, List<MethodCallLineClassTypeMapping>>(26);
methodCallLineClassToFrameworkTypeMappingDictionary.Add("a", methodCallLineClassToFrameworkTypeMappingList.Where(m => m.ClassPrefix.Substring(0, 1).ToLower() == "a").ToList());
Expand Down
Loading

0 comments on commit 6a98474

Please sign in to comment.