Skip to content

Commit 788aca0

Browse files
committed
Bump to 1.0.9-rc1
1 parent 90ed4a5 commit 788aca0

File tree

82 files changed

+506
-744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+506
-744
lines changed

CtfPlayback/CtfPlayback.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
</ItemGroup>
4040

4141
<ItemGroup>
42-
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.9.2" GeneratePathProperty="true"/>
42+
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.9.2" GeneratePathProperty="true" />
43+
<PackageReference Include="Microsoft.Performance.SDK" Version="1.0.7-rc1-g0a52dbd662" />
44+
<PackageReference Include="Microsoft.Performance.SDK.Runtime" Version="1.0.7-rc1-g0a52dbd662" />
45+
<PackageReference Include="Microsoft.Performance.Toolkit.Engine" Version="1.0.7-rc1-g0a52dbd662" />
4346
</ItemGroup>
4447

4548
<ItemGroup>

CtfUnitTest/CtfUnitTest.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
11+
<PackageReference Include="Microsoft.Performance.SDK" Version="1.0.7-rc1-g0a52dbd662" />
1112
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
1213
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
1314
</ItemGroup>

LTTngCds/LTTngCds.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="Microsoft.Performance.SDK" Version="0.109.24" />
32+
<PackageReference Include="Microsoft.Performance.SDK" Version="1.0.7-rc1-g0a52dbd662" />
3333
</ItemGroup>
3434

3535
<ItemGroup>

LTTngCds/LTTngDataProcessor.cs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
using System;
5-
using System.Collections.Generic;
64
using LTTngCds.CookerData;
75
using LTTngCds.MetadataTables;
8-
using Microsoft.Performance.SDK.Extensibility;
96
using Microsoft.Performance.SDK.Extensibility.SourceParsing;
107
using Microsoft.Performance.SDK.Processing;
8+
using System;
119

1210
namespace LTTngCds
1311
{
1412
internal sealed class LTTngDataProcessor
15-
: CustomDataProcessorBaseWithSourceParser<LTTngEvent, LTTngContext, string>,
13+
: CustomDataProcessorWithSourceParser<LTTngEvent, LTTngContext, string>,
1614
IDisposable
1715
{
1816
public LTTngDataProcessor(
19-
ISourceParser<LTTngEvent, LTTngContext, string> sourceParser,
20-
ProcessorOptions options,
21-
IApplicationEnvironment applicationEnvironment,
22-
IProcessorEnvironment processorEnvironment,
23-
IReadOnlyDictionary<TableDescriptor, Action<ITableBuilder, IDataExtensionRetrieval>> allTablesMapping,
24-
IEnumerable<TableDescriptor> metadataTables)
25-
: base(sourceParser, options, applicationEnvironment, processorEnvironment, allTablesMapping, metadataTables)
17+
ISourceParser<LTTngEvent, LTTngContext, string> sourceParser,
18+
ProcessorOptions options,
19+
IApplicationEnvironment applicationEnvironment,
20+
IProcessorEnvironment processorEnvironment)
21+
: base(sourceParser, options, applicationEnvironment, processorEnvironment)
2622
{
2723
}
2824

2925
protected override void BuildTableCore(
30-
TableDescriptor tableDescriptor,
31-
Action<ITableBuilder, IDataExtensionRetrieval> createTable,
26+
TableDescriptor tableDescriptor,
3227
ITableBuilder tableBuilder)
3328
{
3429
if (tableDescriptor.IsMetadataTable)
@@ -38,14 +33,14 @@ protected override void BuildTableCore(
3833
}
3934

4035
private void BuildMetadataTable(
41-
TableDescriptor tableDescriptor,
36+
TableDescriptor tableDescriptor,
4237
ITableBuilder tableBuilder)
4338
{
4439
if (tableDescriptor.Guid == TraceStatsTable.TableDescriptor.Guid)
4540
{
4641
TraceStatsTable.BuildMetadataTable(
47-
tableBuilder,
48-
this.SourceParser as LTTngSourceParser,
42+
tableBuilder,
43+
this.SourceParser as LTTngSourceParser,
4944
this.ApplicationEnvironment.Serializer);
5045
}
5146
}

LTTngCds/LTTngDataSource.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
using Microsoft.Performance.SDK;
5+
using Microsoft.Performance.SDK.Processing;
46
using System;
57
using System.Collections.Generic;
68
using System.IO;
79
using System.Linq;
8-
using Microsoft.Performance.SDK;
9-
using Microsoft.Performance.SDK.Processing;
1010

1111
namespace LTTngCds
1212
{
@@ -89,9 +89,7 @@ protected override ICustomDataProcessor CreateProcessorCore(
8989
sourceParser,
9090
options,
9191
this.applicationEnvironment,
92-
processorEnvironment,
93-
this.AllTables,
94-
this.MetadataTables);
92+
processorEnvironment);
9593
}
9694
}
9795
}

LTTngCds/LTTngSourceParser.cs

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

4-
using System;
5-
using System.Collections.Generic;
6-
using System.Diagnostics;
7-
using System.IO.Compression;
8-
using System.Threading;
94
using CtfPlayback;
105
using CtfPlayback.Inputs;
116
using LTTngCds.CookerData;
@@ -15,12 +10,17 @@
1510
using Microsoft.Performance.SDK;
1611
using Microsoft.Performance.SDK.Extensibility.SourceParsing;
1712
using Microsoft.Performance.SDK.Processing;
13+
using System;
14+
using System.Collections.Generic;
15+
using System.Diagnostics;
16+
using System.IO.Compression;
17+
using System.Threading;
1818
using ILogger = Microsoft.Performance.SDK.Processing.ILogger;
1919

2020
namespace LTTngCds
2121
{
2222
internal sealed class LTTngSourceParser
23-
: SourceParserBase<LTTngEvent, LTTngContext, string>,
23+
: SourceParser<LTTngEvent, LTTngContext, string>,
2424
IDisposable
2525
{
2626
private ICtfInput ctfInput;
@@ -61,7 +61,7 @@ public void SetFolderInput(string folderPath)
6161

6262
public Timestamp LastEventTimestamp { get; private set; }
6363

64-
public DateTime FirstEventWallClock { get; private set;}
64+
public DateTime FirstEventWallClock { get; private set; }
6565

6666
public ulong ProcessingTimeInMilliseconds { get; private set; }
6767

@@ -70,8 +70,8 @@ public void SetFolderInput(string folderPath)
7070
internal Dictionary<string, TraceStatsData> TraceStats = new Dictionary<string, TraceStatsData>(StringComparer.Ordinal);
7171

7272
public override void ProcessSource(
73-
ISourceDataProcessor<LTTngEvent, LTTngContext, string> dataProcessor,
74-
ILogger logger,
73+
ISourceDataProcessor<LTTngEvent, LTTngContext, string> dataProcessor,
74+
ILogger logger,
7575
IProgress<int> progress,
7676
CancellationToken cancellationToken)
7777
{
@@ -111,10 +111,10 @@ void EventCallback(LTTngEvent lttngEvent, LTTngContext lttngContext)
111111
lttngCustomization.RegisterEventCallback(EventCallback);
112112

113113
var playback = new CtfPlayback.CtfPlayback(lttngCustomization, cancellationToken);
114-
playback.Playback(this.ctfInput, new CtfPlaybackOptions {ReadAhead = true}, progressReport);
114+
playback.Playback(this.ctfInput, new CtfPlaybackOptions { ReadAhead = true }, progressReport);
115115

116116
sw.Stop();
117-
this.ProcessingTimeInMilliseconds = (ulong) sw.ElapsedMilliseconds;
117+
this.ProcessingTimeInMilliseconds = (ulong)sw.ElapsedMilliseconds;
118118
}
119119

120120
{

LTTngCds/MetadataTables/TraceStatsTable.cs

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

4+
using Microsoft.Performance.SDK.Processing;
45
using System;
56
using System.Collections.Generic;
67
using System.Linq;
7-
using Microsoft.Performance.SDK.Extensibility;
8-
using Microsoft.Performance.SDK.Processing;
98

109
namespace LTTngCds.MetadataTables
1110
{
@@ -32,7 +31,7 @@ public class TraceStatsTable
3231
new ColumnMetadata(new Guid("{A804856F-698E-4BE6-8408-36B538D46813}"), "Total Payload Size"),
3332
new UIHints { Width = 80, TextAlignment = TextAlignment.Left, });
3433

35-
internal static void BuildMetadataTable(ITableBuilder tableBuilder, LTTngSourceParser sourceParser, ISerializer serializer)
34+
internal static void BuildMetadataTable(ITableBuilder tableBuilder, LTTngSourceParser sourceParser, ITableConfigurationsSerializer serializer)
3635
{
3736
ITableBuilderWithRowCount table = tableBuilder.SetRowCount(sourceParser.TraceStats.Count);
3837

@@ -44,23 +43,23 @@ internal static void BuildMetadataTable(ITableBuilder tableBuilder, LTTngSourceP
4443
var payloadBitCountProjection = traceStatsProjection.Compose(traceStats => (double)traceStats.PayloadBitCount / 8);
4544

4645
table.AddColumn(
47-
new BaseDataColumn<string>(
46+
new DataColumn<string>(
4847
EventNameConfiguration,
4948
eventNameProjection));
5049

5150
table.AddColumn(
52-
new BaseDataColumn<ulong>(
51+
new DataColumn<ulong>(
5352
CountConfiguration,
5453
eventCountProjection));
5554

5655
table.AddColumn(
57-
new BaseDataColumn<double>(
56+
new DataColumn<double>(
5857
TotalPayloadSizeConfiguration,
5958
payloadBitCountProjection));
6059

6160
var configurations = TableConfigurations.GetPrebuiltTableConfigurations(
62-
typeof(TraceStatsTable),
63-
TableDescriptor.Guid,
61+
typeof(TraceStatsTable),
62+
TableDescriptor.Guid,
6463
serializer);
6564

6665
foreach (var configuration in configurations)

LTTngDataExtUnitTest/LTTngDataExtUnitTest.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
11-
<PackageReference Include="Microsoft.Performance.SDK" Version="0.109.24" />
12-
<PackageReference Include="Microsoft.Performance.SDK.Runtime" Version="0.109.24" />
13-
<PackageReference Include="Microsoft.Performance.Toolkit.Engine" Version="0.109.24" />
11+
<PackageReference Include="Microsoft.Performance.SDK" Version="1.0.7-rc1-g0a52dbd662" />
12+
<PackageReference Include="Microsoft.Performance.SDK.Runtime" Version="1.0.7-rc1-g0a52dbd662" />
13+
<PackageReference Include="Microsoft.Performance.Toolkit.Engine" Version="1.0.7-rc1-g0a52dbd662" />
1414
<PackageReference Include="Moq" Version="4.16.1" />
1515
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
1616
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" />

LTTngDataExtUnitTest/LTTngUnitTest.cs

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.IO;
7-
using LTTngDataExtensions.SourceDataCookers;
84
using LTTngDataExtensions.DataOutputTypes;
5+
using LTTngDataExtensions.SourceDataCookers;
6+
using LTTngDataExtensions.SourceDataCookers.Diagnostic_Messages;
7+
using LTTngDataExtensions.SourceDataCookers.Disk;
8+
using LTTngDataExtensions.SourceDataCookers.Module;
99
using LTTngDataExtensions.SourceDataCookers.Syscall;
1010
using LTTngDataExtensions.SourceDataCookers.Thread;
1111
using Microsoft.Performance.SDK.Extensibility;
1212
using Microsoft.Performance.SDK.Processing;
1313
using Microsoft.Performance.Toolkit.Engine;
1414
using Microsoft.VisualStudio.TestTools.UnitTesting;
15-
using UnitTestCommon;
16-
using LTTngDataExtensions.SourceDataCookers.Diagnostic_Messages;
17-
using LTTngDataExtensions.SourceDataCookers.Module;
18-
using LTTngDataExtensions.SourceDataCookers.Disk;
15+
using System;
16+
using System.Collections.Generic;
17+
using System.IO;
1918
using System.IO.Compression;
2019
using System.Linq;
2120

@@ -48,42 +47,42 @@ public static void ProcessTrace()
4847
Assert.IsTrue(lttngDataPath.Exists);
4948

5049
// Approach #1 - Engine - Doesn't test tables UI but tests processing
51-
var runtime = Engine.Create();
52-
53-
runtime.AddFile(lttngDataPath.FullName);
54-
55-
// Enable our various types of data
56-
var lttngGenericEventDataCooker = new LTTngGenericEventDataCooker();
57-
LTTngGenericEventDataCookerPath = lttngGenericEventDataCooker.Path;
58-
runtime.EnableCooker(LTTngGenericEventDataCookerPath);
59-
60-
var lttngSyscallDataCooker = new LTTngSyscallDataCooker();
61-
LTTngSyscallDataCookerPath = lttngSyscallDataCooker.Path;
62-
runtime.EnableCooker(LTTngSyscallDataCookerPath);
63-
64-
var lttngThreadDataCooker = new LTTngThreadDataCooker();
65-
LTTngThreadDataCookerPath = lttngThreadDataCooker.Path;
66-
runtime.EnableCooker(LTTngThreadDataCookerPath);
67-
68-
var lttngDmesgDataCooker = new LTTngDmesgDataCooker();
69-
LTTngDmesgDataCookerPath = lttngDmesgDataCooker.Path;
70-
runtime.EnableCooker(LTTngDmesgDataCookerPath);
71-
72-
var lttngModuleDataCooker = new LTTngModuleDataCooker();
73-
LTTngModuleDataCookerPath = lttngModuleDataCooker.Path;
74-
runtime.EnableCooker(LTTngModuleDataCookerPath);
75-
76-
var lttngDiskDataCooker = new LTTngDiskDataCooker();
77-
LTTngDiskDataCookerPath = lttngDiskDataCooker.Path;
78-
runtime.EnableCooker(LTTngDiskDataCookerPath);
79-
80-
//
81-
// Process our data.
82-
//
83-
84-
RuntimeExecutionResults = runtime.Process();
85-
86-
IsTraceProcessed = true;
50+
using (var runtime = Engine.Create(new FileDataSource(lttngDataPath.FullName)))
51+
{
52+
53+
// Enable our various types of data
54+
var lttngGenericEventDataCooker = new LTTngGenericEventDataCooker();
55+
LTTngGenericEventDataCookerPath = lttngGenericEventDataCooker.Path;
56+
runtime.EnableCooker(LTTngGenericEventDataCookerPath);
57+
58+
var lttngSyscallDataCooker = new LTTngSyscallDataCooker();
59+
LTTngSyscallDataCookerPath = lttngSyscallDataCooker.Path;
60+
runtime.EnableCooker(LTTngSyscallDataCookerPath);
61+
62+
var lttngThreadDataCooker = new LTTngThreadDataCooker();
63+
LTTngThreadDataCookerPath = lttngThreadDataCooker.Path;
64+
runtime.EnableCooker(LTTngThreadDataCookerPath);
65+
66+
var lttngDmesgDataCooker = new LTTngDmesgDataCooker();
67+
LTTngDmesgDataCookerPath = lttngDmesgDataCooker.Path;
68+
runtime.EnableCooker(LTTngDmesgDataCookerPath);
69+
70+
var lttngModuleDataCooker = new LTTngModuleDataCooker();
71+
LTTngModuleDataCookerPath = lttngModuleDataCooker.Path;
72+
runtime.EnableCooker(LTTngModuleDataCookerPath);
73+
74+
var lttngDiskDataCooker = new LTTngDiskDataCooker();
75+
LTTngDiskDataCookerPath = lttngDiskDataCooker.Path;
76+
runtime.EnableCooker(LTTngDiskDataCookerPath);
77+
78+
//
79+
// Process our data.
80+
//
81+
82+
RuntimeExecutionResults = runtime.Process();
83+
84+
IsTraceProcessed = true;
85+
}
8786
}
8887
}
8988
}
@@ -98,15 +97,14 @@ public void ProcessTraceAsFolder()
9897

9998
ZipFile.ExtractToDirectory(lttngData[0], tempDirectory);
10099

101-
// Approach #1 - Engine - Doesn't test tables UI but tests processing
102-
var runtime = Engine.Create();
103-
104100
var ds = new DirectoryDataSource(tempDirectory);
105-
runtime.AddDataSource(ds);
106-
107-
Assert.IsTrue(ds.IsDirectory());
108-
Assert.IsTrue(runtime.SourceDataCookers.Count() >= 1);
109-
Assert.IsTrue(runtime.AvailableTables.Count() >= 1);
101+
// Approach #1 - Engine - Doesn't test tables UI but tests processing
102+
using (var runtime = Engine.Create(ds))
103+
{
104+
Assert.IsTrue(ds.IsDirectory());
105+
Assert.IsTrue(runtime.EnabledCookers.Where(cooker => cooker.DataCookerType == DataCookerType.SourceDataCooker).Count() >= 1);
106+
Assert.IsTrue(runtime.AvailableTables.Count() >= 1);
107+
}
110108

111109
Directory.Delete(tempDirectory, true);
112110
}

LTTngDataExtensions/LTTngDataExtensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</ItemGroup>
6565

6666
<ItemGroup>
67-
<PackageReference Include="Microsoft.Performance.SDK" Version="0.109.24" />
67+
<PackageReference Include="Microsoft.Performance.SDK" Version="1.0.7-rc1-g0a52dbd662" />
6868
</ItemGroup>
6969

7070
<ItemGroup>

0 commit comments

Comments
 (0)