Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
refs #108 show time in havester statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
grayfallstown committed Jul 17, 2021
1 parent 42a7a80 commit d1b768d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChiaPlotStatusGUI/GUI/Assets/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Buttons:
Save: "Save"

Columns:
RuntimeMinutes: "Time Frame Minutes"
PoolPuzzleHash: "Pool Puzzle / Address"
Tmp1Drive: "Tmp1"
Tmp2Drive: "Tmp2"
Expand Down Expand Up @@ -88,6 +89,7 @@ Columns:


Tooltips:
RuntimeMinutes: "This statistic uses the last n minutes from the log for its calculations"
PoolPuzzleHash: "The Pool Puzzle Hash if you plot with madmax and the pool address if you still use chiapos."
JsonExport: "Export shown data to Json. Check <Raw Export> if you want plain unformatted numbers."
YamlExport: "Export shown data to Yaml. Check <Raw Export> if you want plain unformatted numbers."
Expand Down
2 changes: 2 additions & 0 deletions ChiaPlotStatusGUI/GUI/Models/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public class Tooltips
public string MaxHeat { get; set; } = "";
public string MinHeat { get; set; } = "";
public string PoolPuzzleHash { get; set; } = "";
public string RuntimeMinutes { get; set; } = "";
}

public class Columns
Expand Down Expand Up @@ -189,5 +190,6 @@ public class Columns
public string MaxHeat { get; set; } = "";
public string MinHeat { get; set; } = "";
public string PoolPuzzleHash { get; set; } = "";
public string RuntimeMinutes { get; set; } = "";
}
}
17 changes: 17 additions & 0 deletions ChiaPlotStatusGUI/GUI/Views/HarvestDialog.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,23 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn SortMemberPath="RuntimeMinutes">
<DataGridTemplateColumn.Header>
<Button Content="{Binding ElementName=WindowContext, Path=DataContext.Language.Columns.RuntimeMinutes}" HorizontalAlignment="Left" Click="DataGridHeaderClick"></Button>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<ToolTip.Tip>
<StackPanel>
<TextBlock Text="{Binding ElementName=WindowContext, Path=DataContext.Language.Tooltips.RuntimeMinutes}"></TextBlock>
</StackPanel>
</ToolTip.Tip>
<TextBlock Text="{Binding RuntimeMinutes}" HorizontalAlignment="Left" ></TextBlock>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn SortMemberPath="AvgLookupTime">
<DataGridTemplateColumn.Header>
<Button Content="{Binding ElementName=WindowContext, Path=DataContext.Language.Columns.AvgLookupTime}" HorizontalAlignment="Left" Click="DataGridHeaderClick"></Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ void add(string blockchain)
AvgHeat = harvests.Average(a => a.Heat),
MaxHeat = harvests.Aggregate((a, b) => a.LookupTime > b.LookupTime ? a : b).LookupTime,
MinHeat = harvests.Aggregate((a, b) => a.LookupTime < b.LookupTime ? a : b).LookupTime,
RuntimeMinutes = runtimeMinutes,
};

return new(path, summary, harvests);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public class HarvestSummary
public double AvgHeat { get; set; }
public double MaxHeat { get; set; }
public double MinHeat { get; set; }
public double RuntimeMinutes { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class HarvestSummeryReadable
public string AvgHeat { get; set; }
public string MaxHeat { get; set; }
public string MinHeat { get; set; }
public string RuntimeMinutes { get; set; }

public HarvestSummeryReadable(HarvestSummary summery)
{
Expand All @@ -36,6 +37,7 @@ public HarvestSummeryReadable(HarvestSummary summery)
this.AvgHeat = Formatter.formatDouble(summery.AvgHeat, 5, null);
this.MaxHeat = Formatter.formatDouble(summery.MaxHeat, 5, null);
this.MinHeat = Formatter.formatDouble(summery.MinHeat, 5, null);
this.RuntimeMinutes = Formatter.formatDouble(summery.RuntimeMinutes, 2, null);
}
}
}

0 comments on commit d1b768d

Please sign in to comment.