Skip to content

Commit

Permalink
Setup Tracy
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Oct 25, 2024
1 parent b1dc2fa commit 74806f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Studio/CelesteStudio.GTK/CelesteStudio.GTK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RuntimeIdentifiers>linux-x64;linux-arm;linux-arm64</RuntimeIdentifiers>

<RestoreSources>$(RestoreSources);https://www.myget.org/F/eto/api/v3/index.json;https://api.nuget.org/v3/index.json</RestoreSources>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
Expand All @@ -20,6 +21,8 @@

<!-- Use a CI-build, since that contains a fix for some issues -->
<PackageReference Include="Eto.Platform.Gtk" Version="2.8.4-ci-20240710.9879198421" />

<PackageReference Include="Tracy.NET" Version="0.11.1.7" Enabled="true" ProfileAllMethods="true"/>
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Studio/CelesteStudio/CelesteStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<PackageReference Include="Eto.Forms" Version="2.8.3" />
<PackageReference Include="Samboy063.Tomlet" Version="5.3.1" />
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Tracy.NET" Version="0.11.1.7" Enabled="true" ProfileAllMethods="true"/>

<ProjectReference Include="..\..\StudioCommunication\StudioCommunication.csproj" />
<ProjectReference Include="..\..\external\Featherline\Featherline.csproj" />
Expand Down
18 changes: 15 additions & 3 deletions Studio/CelesteStudio/Communication/CommunicationAdapterStudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Eto.Forms;
using StudioCommunication;
using StudioCommunication.Util;
using TracyNET;

namespace CelesteStudio.Communication;

Expand Down Expand Up @@ -249,7 +250,18 @@ public void WriteRecordTAS(string fileName) {
return gameData[gameDataType];
}

protected override void LogInfo(string message) => Console.WriteLine($"[Info] Studio Communication @ Studio: {message}");
protected override void LogVerbose(string message) => Console.WriteLine($"[Verbose] Studio Communication @ Studio: {message}");
protected override void LogError(string message) => Console.Error.WriteLine($"[Error] Studio Communication @ Studio: {message}");
protected override void LogInfo(string message) {
Console.WriteLine($"[Info] Studio Communication @ Studio: {message}");
Tracy.Message($"[Info] StudioCom: {message}", 0x14AAC7);
}

protected override void LogVerbose(string message) {
Console.WriteLine($"[Verbose] Studio Communication @ Studio: {message}");
Tracy.Message($"[Verbose] StudioCom: {message}", 0xB91CD0);
}

protected override void LogError(string message) {
Console.Error.WriteLine($"[Error] Studio Communication @ Studio: {message}");
Tracy.Message($"[Error] StudioCom: {message}", 0xD33C2A);
}
}

0 comments on commit 74806f4

Please sign in to comment.