Skip to content

Commit 2fd3417

Browse files
authored
Merge pull request #123 from mslukebo/user/lukebo/aboutInfo
Include required properties on all ProcessingSourceInfo instances returned by processing sources
2 parents a0717b7 + f2a7556 commit 2fd3417

16 files changed

+113
-76
lines changed

LTTngCds/LTTngCds.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
5-
<Version>1.3.0</Version>
5+
<Version>1.3.1</Version>
66
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
77
<Authors>Microsoft</Authors>
88
<Company>Microsoft Corp.</Company>
@@ -33,6 +33,7 @@
3333

3434
<ItemGroup>
3535
<ProjectReference Include="..\CtfPlayback\CtfPlayback.csproj" />
36+
<ProjectReference Include="..\Utilities\Utilities.csproj" />
3637
</ItemGroup>
3738

3839
</Project>

LTTngCds/LTTngDataSource.cs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using Microsoft.Performance.SDK;
99
using Microsoft.Performance.SDK.Processing;
10+
using Utilities;
1011

1112
namespace LTTngCds
1213
{
@@ -22,7 +23,7 @@ public class LTTngDataSource
2223
private IApplicationEnvironment applicationEnvironment;
2324

2425
/// <inheritdoc />
25-
public override IEnumerable<Option> CommandLineOptions => new List<Option> { new Option("LTTngOffsetTime", "offsetTime", 1, 1) };
26+
public override IEnumerable<Option> CommandLineOptions => new List<Option> { new Option("LTTngOffsetTime", "offsetTime", 1, 1) };
2627

2728
protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
2829
{
@@ -36,23 +37,23 @@ protected override bool IsDataSourceSupportedCore(IDataSource dataSource)
3637

3738
public override ProcessingSourceInfo GetAboutInfo()
3839
{
39-
return new ProcessingSourceInfo()
40+
var info = ProcessingSourceInfoGenerator.GetEmpty();
41+
info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
42+
info.CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year;
43+
info.AdditionalInformation = new[]
4044
{
41-
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
42-
CopyrightNotice = "Copyright (C) " + DateTime.UtcNow.Year,
43-
AdditionalInformation = new[]
44-
{
45-
"Built using Antlr 4\n" +
46-
"Copyright (c) 2012 Terence Parr and Sam Harwell\n" +
47-
"All rights reserved.\n" +
48-
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n" +
49-
"\n" +
50-
"Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n" +
51-
"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" +
52-
"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" +
53-
"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",
54-
},
45+
"Built using Antlr 4\n" +
46+
"Copyright (c) 2012 Terence Parr and Sam Harwell\n" +
47+
"All rights reserved.\n" +
48+
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n" +
49+
"\n" +
50+
"Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n" +
51+
"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" +
52+
"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" +
53+
"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",
5554
};
55+
56+
return info;
5657
}
5758

5859
/// <inheritdoc />

LTTngDataExtensions/LTTngDataExtensions.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
5-
<Version>1.3.0</Version>
5+
<Version>1.3.1</Version>
66
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
77
<Authors>Microsoft</Authors>
88
<Company>Microsoft Corp.</Company>
@@ -72,8 +72,8 @@
7272
</ItemGroup>
7373

7474
<ItemGroup>
75-
<None Update="pluginManifest.json">
76-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
75+
<None Update="pluginManifest.json">
76+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7777
</None>
7878
<None Update="Resources\DiskActivityPrebuiltConfiguration.json">
7979
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

LTTngDataExtensions/pluginManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
33
"identity": {
44
"id": "Microsoft.Performance.Toolkit.Plugins.LTTngDataExtensions",
5-
"version": "1.3.0"
5+
"version": "1.3.1"
66
},
77
"displayName": "Linux - LTTng",
88
"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",

PerfDataExtension/PerfDataExtension.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<OutputType>Library</OutputType>
6-
<Version>0.1.2</Version>
6+
<Version>0.1.3</Version>
77
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
88
<Authors>Microsoft</Authors>
99
<Company>Microsoft</Company>
@@ -59,6 +59,10 @@
5959
</Compile>
6060
</ItemGroup>
6161

62+
<ItemGroup>
63+
<ProjectReference Include="..\Utilities\Utilities.csproj" />
64+
</ItemGroup>
65+
6266
<Target Name="CopyToTargetDirTarget" AfterTargets="Build">
6367
<Copy SourceFiles="@(CopyToTargetDir)" DestinationFolder="$(TargetDir)" />
6468
</Target>

PerfDataExtension/PerfDataProcessingSource.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
using Utilities;
5+
46
namespace Microsoft.Performance.Toolkit.Plugins.PerfDataExtension
57
{
68
using Microsoft.LinuxTracepoints.Decode;
@@ -21,13 +23,14 @@ public sealed class PerfDataProcessingSource
2123
{
2224
public override ProcessingSourceInfo GetAboutInfo()
2325
{
24-
return new ProcessingSourceInfo
25-
{
26-
CopyrightNotice = "Copyright (c) Microsoft Corporation. All rights reserved.",
27-
LicenseInfo = new LicenseInfo { Name = "MIT" },
28-
Owners = Array.Empty<ContactInfo>(),
29-
ProjectInfo = new ProjectInfo { Uri = "https://github.com/microsoft/LinuxTracepoints-Net" },
30-
};
26+
var info = ProcessingSourceInfoGenerator.GetEmpty();
27+
28+
info.CopyrightNotice = "Copyright (c) Microsoft Corporation. All rights reserved.";
29+
info.LicenseInfo = new LicenseInfo { Name = "MIT" };
30+
info.Owners = Array.Empty<ContactInfo>();
31+
info.ProjectInfo = new ProjectInfo { Uri = "https://github.com/microsoft/LinuxTracepoints-Net" };
32+
33+
return info;
3134
}
3235

3336
protected override bool IsDataSourceSupportedCore(IDataSource dataSource)

PerfDataExtension/pluginManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
33
"identity": {
44
"id": "Microsoft.Performance.Toolkit.Plugins.PerfDataExtension",
5-
"version": "0.1.2"
5+
"version": "0.1.3"
66
},
77
"displayName": "Linux - Perf",
88
"description": "Enables loading Linux events from perf.data files (e.g. generated by the perf tool)",

PerfDataTxtExtension/PerfDataTxtExtension.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
5-
<Version>1.2.3</Version>
5+
<Version>1.2.5</Version>
66
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
77
<Authors>Microsoft</Authors>
88
<Company>Microsoft Corp.</Company>
@@ -60,8 +60,8 @@
6060
</ItemGroup>
6161

6262
<ItemGroup>
63-
<None Update="pluginManifest.json">
64-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
63+
<None Update="pluginManifest.json">
64+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6565
</None>
6666
<None Update="Resources\DiskActivityPrebuiltConfiguration.json">
6767
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

PerfDataTxtExtension/SourceDataCookers/PerfDataProcessingSource.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.IO;
77
using System.Linq;
88
using Microsoft.Performance.SDK.Processing;
9+
using Utilities;
910

1011
namespace PerfDataProcessingSource
1112
{
@@ -44,10 +45,9 @@ public class PerfDataProcessingSource
4445

4546
public override ProcessingSourceInfo GetAboutInfo()
4647
{
47-
return new ProcessingSourceInfo()
48-
{
49-
ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" },
50-
};
48+
var info = ProcessingSourceInfoGenerator.GetEmpty();
49+
info.ProjectInfo = new ProjectInfo() { Uri = "https://aka.ms/linuxperftools" };
50+
return info;
5151
}
5252

5353
protected override void SetApplicationEnvironmentCore(IApplicationEnvironment applicationEnvironment)

PerfDataTxtExtension/pluginManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json",
33
"identity": {
44
"id": "Microsoft.Performance.Toolkit.Plugins.PerfDataTxtExtension",
5-
"version": "1.2.4"
5+
"version": "1.2.5"
66
},
77
"displayName": "Linux - Perf",
88
"description": "Enables viewing Linux CPU Sampling events recorded with the kernel perf profiling utility",

0 commit comments

Comments
 (0)