Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] Capture profiling artifacts #5369

Merged
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
babdd49
set profiling arguments
HarshaNalluru Feb 8, 2023
e7f4118
add a space
HarshaNalluru Feb 8, 2023
30798a4
testing
HarshaNalluru Feb 8, 2023
163f303
more testing
HarshaNalluru Feb 8, 2023
247676c
formatting
HarshaNalluru Feb 8, 2023
4045cc3
remove logs
HarshaNalluru Feb 8, 2023
aa0699a
serviceLanguageInfo.Project testing
HarshaNalluru Feb 8, 2023
8ed8fd6
remove console.logs
HarshaNalluru Feb 8, 2023
a3b8005
testing
HarshaNalluru Feb 11, 2023
bd92b20
ILanguage fix
HarshaNalluru Feb 11, 2023
3256566
LanguageBase update
HarshaNalluru Feb 11, 2023
6e217bb
Merge branch 'main' of https://github.com/Azure/azure-sdk-tools into …
HarshaNalluru Feb 11, 2023
ac31a8e
build fixes
HarshaNalluru Feb 11, 2023
f9f8483
delete unneeded dependency
HarshaNalluru Feb 11, 2023
56f92e7
strip package name
Feb 11, 2023
d793cb0
remove console logs
Feb 11, 2023
3508975
profileOutputPath
Feb 11, 2023
b8ade95
Update tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/JavaScrip…
HarshaNalluru Feb 13, 2023
5fccad2
Update tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/JavaScrip…
HarshaNalluru Feb 17, 2023
3c141f4
Update tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/JavaScrip…
HarshaNalluru Feb 17, 2023
341dd0d
address feedback
HarshaNalluru Feb 17, 2023
e522c4f
Merge branch 'harshan/set-profiling-artifacts' of https://github.com/…
HarshaNalluru Feb 17, 2023
c8abcd6
remove i
HarshaNalluru Feb 17, 2023
9cd3e1d
Update tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/JavaScrip…
HarshaNalluru Feb 17, 2023
945707c
strip package name
HarshaNalluru Feb 18, 2023
a69c1ef
Merge branch 'harshan/set-profiling-artifacts' of https://github.com/…
HarshaNalluru Feb 18, 2023
cd84304
add arguments in the name of the profile generated
HarshaNalluru Feb 18, 2023
0f9c436
Fix formatting
mikeharder Feb 18, 2023
cc6501b
Remove unnecessary using
mikeharder Feb 18, 2023
f1f6290
Remove whitespace
mikeharder Feb 18, 2023
43ee897
Improve formatting
mikeharder Feb 18, 2023
68a8935
Code cleanup
mikeharder Feb 18, 2023
03ef2a1
.TrimEnd(" ")
HarshaNalluru Feb 21, 2023
1a331ec
default is space for trimend
HarshaNalluru Feb 21, 2023
1595d7e
" --" -> "_"
HarshaNalluru Feb 21, 2023
b822494
.Replace(" --", "_").Replace("--", "_").
HarshaNalluru Feb 21, 2023
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
3 changes: 2 additions & 1 deletion tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/Cpp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public override async Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context)
object context,
int iteration)
{
var perfExe = (string)context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context);
object context,
int iteration);
mikeharder marked this conversation as resolved.
Show resolved Hide resolved
}
}
3 changes: 2 additions & 1 deletion tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/Java.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public override async Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context)
object context,
int iteration)
{
var jarFile = (string)context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Text.Json.JsonSerializer;

namespace Azure.Sdk.Tools.PerfAutomation
{
Expand Down Expand Up @@ -131,7 +132,8 @@ public override async Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context)
object context,
int iteration)
{
var runtimePackageVersions = (Dictionary<string, string>)context;

Expand All @@ -140,6 +142,11 @@ public override async Task<IterationResult> RunAsync(

var projectDirectory = Path.Combine(WorkingDirectory, project);

if(profile){
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
var stripPackageName = primaryPackage.Split(new char[] { '/' })[1]; // "@azure/storage-blob" -> "storage-blob"
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
var profileOutputPath = Path.GetFullPath(Path.Combine(Util.GetProfileDirectory(WorkingDirectory),stripPackageName, $"{packageVersions[primaryPackage]}_{testName}_{iteration}.cpuprofile"));
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
arguments = arguments + $" --profile true --profile-filepath {profileOutputPath}";
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
}
var testResult = await Util.RunAsync("npm", $"run perf-test:node -- {testName} {arguments}",
projectDirectory, outputBuilder: outputBuilder, errorBuilder: errorBuilder, throwOnError: false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public abstract Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context);
object context,
int iteration);

public abstract Task<(string output, string error, object context)> SetupAsync(
string project,
Expand Down
3 changes: 2 additions & 1 deletion tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/Net.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public override async Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context)
object context,
int iteration)
{
var dllName = Path.GetFileNameWithoutExtension(project) + ".dll";
var dllPath = Path.Combine(PublishDirectory, dllName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ private static async Task RunPackageVersion(
test.Class,
allArguments,
options.Profile,
context
context,
i // iteration number
);
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public override async Task<IterationResult> RunAsync(
string testName,
string arguments,
bool profile,
object context)
object context,
int iteration)
{
var projectDirectory = Path.Combine(WorkingDirectory, project);

Expand Down