-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added python project for results analisys
- Loading branch information
Showing
6 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
/packages | ||
/results | ||
/data/dictionary | ||
/benchmark/flavors-analisys/.vs/flavors-analisys/v15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>3c2889e9-75e1-44ee-8422-f7978c05abdd</ProjectGuid> | ||
<ProjectHome>.</ProjectHome> | ||
<StartupFile>flavorsAnalisys.py</StartupFile> | ||
<SearchPath> | ||
</SearchPath> | ||
<WorkingDirectory>.</WorkingDirectory> | ||
<OutputPath>.</OutputPath> | ||
<Name>flavors-analisys</Name> | ||
<RootNamespace>flavors-analisys</RootNamespace> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="findBenchmarks.py" /> | ||
<Compile Include="flavorsBenchmarks.py" /> | ||
<Compile Include="flavorsAnalisys.py" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" /> | ||
<!-- Uncomment the CoreCompile target to enable the Build command in | ||
Visual Studio and specify your pre- and post-build commands in | ||
the BeforeBuild and AfterBuild targets below. --> | ||
<!--<Target Name="CoreCompile" />--> | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27130.2010 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "flavors-analisys", "flavors-analisys.pyproj", "{3C2889E9-75E1-44EE-8422-F7978C05ABDD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3C2889E9-75E1-44EE-8422-F7978C05ABDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3C2889E9-75E1-44EE-8422-F7978C05ABDD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {46B7551D-9F3B-47BB-B804-9E7BE1BCC2B2} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import pandas as pd | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
def calculateThroughputs(data): | ||
columns = list(data) | ||
|
||
if 'Sort' in columns: | ||
data['BuildThroughput'] = data['Count'] / (data['Sort'] + data['Reshape'] + data['Build']) * 10 ** 9 | ||
else: | ||
data['BuildThroughput'] = data['Count'] / data['Build'] * 10 ** 9 | ||
|
||
data['FindThroughput'] = data['Count'] / data['Find'] * 10 ** 9 | ||
data['FindRandomThroughput'] = data['RandomCount'] / data['FindRandom'] * 10 ** 9 | ||
|
||
if 'FindRandomSorted' in columns: | ||
data['FindSortedThroughput'] = data['RandomCount'] / data['FindRandomSorted'] * 10 ** 9 | ||
|
||
return data | ||
|
||
dataPath = 'D:\\Projekty\\flavors-results\\P100-keys\\keysResults.csv' | ||
#dataPath = 'D:\\Projekty\\flavors-results\\4790K-hostKeys\\hostResults.csv' | ||
|
||
rawData = calculateThroughputs( | ||
pd.read_csv( | ||
dataPath, | ||
sep=';')) | ||
|
||
data = pd.DataFrame( | ||
pd.pivot_table( | ||
pd.DataFrame( | ||
pd.pivot_table( | ||
rawData, | ||
index=['Config', 'Count', 'RandomCount'], | ||
values=['BuildThroughput', 'FindThroughput', 'FindRandomThroughput'], | ||
aggfunc=[np.mean]) | ||
.to_records()) | ||
.rename( | ||
index=str, | ||
columns={"('mean', 'BuildThroughput')": "BuildThroughput", "('mean', 'FindThroughput')": "FindThroughput", "('mean', 'FindRandomThroughput')": "FindRandomThroughput"}), | ||
index=['Count'], | ||
values=['BuildThroughput', 'FindThroughput', 'FindRandomThroughput'], | ||
aggfunc=[np.max]).to_records()).rename(index=str, | ||
columns={"('amax', 'BuildThroughput')": "BuildThroughput", "('amax', 'FindThroughput')": "FindThroughput", "('amax', 'FindRandomThroughput')": "FindRandomThroughput"}) | ||
|
||
print(data) | ||
|
||
data.plot( | ||
x='Count', | ||
y='BuildThroughput', | ||
title='BuildThroughput', | ||
grid='on', | ||
kind='line', | ||
ax=plt.gca()) | ||
|
||
plt.figure() | ||
data.plot( | ||
x='Count', | ||
y='FindThroughput', | ||
title='FindThroughput', | ||
grid='on', | ||
kind='line', | ||
ax=plt.gca()) | ||
|
||
plt.figure() | ||
data.plot( | ||
x='Count', | ||
y='FindRandomThroughput', | ||
title='FindRandomThroughput', | ||
grid='on', | ||
kind='line', | ||
ax=plt.gca()) | ||
plt.show() | ||
|
File renamed without changes.