Skip to content

Include required properties on all ProcessingSourceInfo instances returned by processing sources #123

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

Merged
merged 3 commits into from
Jun 4, 2024
Merged
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
3 changes: 2 additions & 1 deletion LTTngCds/LTTngCds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down Expand Up @@ -33,6 +33,7 @@

<ItemGroup>
<ProjectReference Include="..\CtfPlayback\CtfPlayback.csproj" />
<ProjectReference Include="..\Utilities\Utilities.csproj" />
</ItemGroup>

</Project>
33 changes: 17 additions & 16 deletions LTTngCds/LTTngDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Linq;
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Processing;
using Utilities;

namespace LTTngCds
{
Expand All @@ -22,7 +23,7 @@ public class LTTngDataSource
private IApplicationEnvironment applicationEnvironment;

/// <inheritdoc />
public override IEnumerable<Option> CommandLineOptions => new List<Option> { new Option("LTTngOffsetTime", "offsetTime", 1, 1) };
public override IEnumerable<Option> CommandLineOptions => new List<Option> { new Option("LTTngOffsetTime", "offsetTime", 1, 1) };

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
{
Expand All @@ -36,23 +37,23 @@ protected override bool IsDataSourceSupportedCore(IDataSource dataSource)

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
var info = ProcessingSourceInfoGenerator.GetEmpty();
info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
info.AdditionalInformation = new[]
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
AdditionalInformation = new[]
{
"Built using Antlr 4\n" +
"Copyright (c) 2012 Terence Parr and Sam Harwell\n" +
"All rights reserved.\n" +
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n" +
"\n" +
"Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n" +
"Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n" +
"Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n" +
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
},
"Built using Antlr 4\n" +
"Copyright (c) 2012 Terence Parr and Sam Harwell\n" +
"All rights reserved.\n" +
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n" +
"\n" +
"Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n" +
"Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n" +
"Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n" +
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
};

return info;
}

/// <inheritdoc />
Expand Down
6 changes: 3 additions & 3 deletions LTTngDataExtensions/LTTngDataExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down Expand Up @@ -72,8 +72,8 @@
</ItemGroup>

<ItemGroup>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\DiskActivityPrebuiltConfiguration.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion LTTngDataExtensions/pluginManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
"identity": {
"id": "Microsoft.Performance.Toolkit.Plugins.LTTngDataExtensions",
"version": "1.3.0"
"version": "1.3.1"
},
"displayName": "Linux - LTTng",
"description": "Enables processing LTTng performance trace files that contain key Linux performance indicators, such as kernel CPU scheduling, system calls, file events, and userspace applications",
Expand Down
6 changes: 5 additions & 1 deletion PerfDataExtension/PerfDataExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<Version>0.1.2</Version>
<Version>0.1.3</Version>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
Expand Down Expand Up @@ -59,6 +59,10 @@
</Compile>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Utilities\Utilities.csproj" />
</ItemGroup>

<Target Name="CopyToTargetDirTarget" AfterTargets="Build">
<Copy SourceFiles="@(CopyToTargetDir)" DestinationFolder="$(TargetDir)" />
</Target>
Expand Down
17 changes: 10 additions & 7 deletions PerfDataExtension/PerfDataProcessingSource.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Utilities;

namespace Microsoft.Performance.Toolkit.Plugins.PerfDataExtension
{
using Microsoft.LinuxTracepoints.Decode;
Expand All @@ -21,13 +23,14 @@ public sealed class PerfDataProcessingSource
{
public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo
{
CopyrightNotice = "Copyright (c) Microsoft Corporation. All rights reserved.",
LicenseInfo = new LicenseInfo { Name = "MIT" },
Owners = Array.Empty<ContactInfo>(),
ProjectInfo = new ProjectInfo { Uri = "https://github.com/microsoft/LinuxTracepoints-Net" },
};
var info = ProcessingSourceInfoGenerator.GetEmpty();

info.CopyrightNotice = "Copyright (c) Microsoft Corporation. All rights reserved.";
info.LicenseInfo = new LicenseInfo { Name = "MIT" };
info.Owners = Array.Empty<ContactInfo>();
info.ProjectInfo = new ProjectInfo { Uri = "https://github.com/microsoft/LinuxTracepoints-Net" };

return info;
}

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
Expand Down
2 changes: 1 addition & 1 deletion PerfDataExtension/pluginManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
"identity": {
"id": "Microsoft.Performance.Toolkit.Plugins.PerfDataExtension",
"version": "0.1.2"
"version": "0.1.3"
},
"displayName": "Linux - Perf",
"description": "Enables loading Linux events from perf.data files (e.g. generated by the perf tool)",
Expand Down
6 changes: 3 additions & 3 deletions PerfDataTxtExtension/PerfDataTxtExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.2.3</Version>
<Version>1.2.5</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down Expand Up @@ -60,8 +60,8 @@
</ItemGroup>

<ItemGroup>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\DiskActivityPrebuiltConfiguration.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using Microsoft.Performance.SDK.Processing;
using Utilities;

namespace PerfDataProcessingSource
{
Expand Down Expand Up @@ -44,10 +45,9 @@ public class PerfDataProcessingSource

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
};
var info = ProcessingSourceInfoGenerator.GetEmpty();
info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
return info;
}

protected override void SetApplicationEnvironmentCore(IApplicationEnvironment applicationEnvironment)
Expand Down
2 changes: 1 addition & 1 deletion PerfDataTxtExtension/pluginManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
"identity": {
"id": "Microsoft.Performance.Toolkit.Plugins.PerfDataTxtExtension",
"version": "1.2.4"
"version": "1.2.5"
},
"displayName": "Linux - Perf",
"description": "Enables viewing Linux CPU Sampling events recorded with the kernel perf profiling utility",
Expand Down
10 changes: 5 additions & 5 deletions PerfettoCds/PerfettoCds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.5.5</Version>
<Version>1.5.6</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down Expand Up @@ -50,10 +50,10 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<ItemGroup>
<None Update="pluginManifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Target Name="CopyRulesToTarget" AfterTargets="Build">
Expand Down
65 changes: 35 additions & 30 deletions PerfettoCds/Pipeline/PerfettoDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
using System.IO;
using System.Linq;
using Microsoft.Performance.SDK.Processing;
using Utilities;

namespace PerfettoCds
{
public static class PerfettoCds
{
public static string[] PerfettoCopyrightLicense = new string[]
{
public static class PerfettoCds
{
public static string[] PerfettoCopyrightLicense = new string[]
{
"Built using Google Perfetto 4\n" +
"Copyright (C) 2020 The Android Open Source Project\n" +
"\n" +
Expand All @@ -25,8 +26,8 @@ public static class PerfettoCds
"distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
"See the License for the specific language governing permissions and\n" +
"limitations under the License.\n"
};
"limitations under the License.\n"
};
}

[ProcessingSource("9fc8515e-9206-4690-b14a-3e7b54745c5f", "PerfettoTraceDataSource", "Processes Perfetto trace files")]
Expand All @@ -47,12 +48,13 @@ protected override ICustomDataProcessor CreateProcessorCore(IEnumerable<IDataSou

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense,
};
var info = ProcessingSourceInfoGenerator.GetEmpty();

info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
info.AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense;

return info;
}

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
Expand Down Expand Up @@ -91,12 +93,13 @@ protected override ICustomDataProcessor CreateProcessorCore(IEnumerable<IDataSou

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense,
};
var info = ProcessingSourceInfoGenerator.GetEmpty();

info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
info.AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense;

return info;
}

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
Expand Down Expand Up @@ -135,12 +138,13 @@ protected override ICustomDataProcessor CreateProcessorCore(IEnumerable<IDataSou

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense,
};
var info = ProcessingSourceInfoGenerator.GetEmpty();

info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
info.AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense;

return info;
}

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
Expand Down Expand Up @@ -179,12 +183,13 @@ protected override ICustomDataProcessor CreateProcessorCore(IEnumerable<IDataSou

public override ProcessingSourceInfo GetAboutInfo()
{
return new ProcessingSourceInfo()
{
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense,
};
var info = ProcessingSourceInfoGenerator.GetEmpty();

info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
info.AdditionalInformation = PerfettoCds.PerfettoCopyrightLicense;

return info;
}

protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
Expand Down
2 changes: 1 addition & 1 deletion PerfettoCds/pluginManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
"identity": {
"id": "Microsoft.Performance.Toolkit.Plugins.PerfettoPlugin",
"version": "1.5.5"
"version": "1.5.6"
},
"displayName": "Perfetto for Android and Chromium",
"description": "Processes Android system and user traces, as well as Chromium based browser performance trace files",
Expand Down
2 changes: 1 addition & 1 deletion PerfettoProcessor/PerfettoProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.5.5</Version>
<Version>1.5.6</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down
23 changes: 23 additions & 0 deletions Utilities/ProcessingSourceInfoGenerator.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using Microsoft.Performance.SDK.Processing;

namespace Utilities
{
public static class ProcessingSourceInfoGenerator
{
public static ProcessingSourceInfo GetEmpty()
{
return new ProcessingSourceInfo()
{
Owners = Array.Empty<ContactInfo>(),
ProjectInfo = null,
LicenseInfo = null,
CopyrightNotice = null,
AdditionalInformation = Array.Empty<string>(),
};
}
}
}
2 changes: 1 addition & 1 deletion Utilities/Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.2.2</Version>
<Version>1.2.3</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft Corp.</Company>
Expand Down
Loading