Skip to content

Commit

Permalink
Reworked the publish query based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub committed Oct 4, 2023
1 parent 8412b82 commit 3ac28df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public class PublishNotification {
static final String rowIndent = " ".repeat(10);
final String[] tables = {"worst_since_last_version"};
final String[] tables = {"nightly_worst_rate_change"};
final URL queryFile;
final URL svgTemplate;
final Path outputDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

platform_details = bench_platforms.sort_descending(['run_id']).group_by(['run_id']).first_by().ungroup()

worst_since_last_version = bench_results.where([
nightly_worst_rate_change = bench_results.where([
'benchmark_name.endsWith(`-Static`)'
]).exact_join(
bench_platforms.where(['name=`deephaven.version`']),
Expand All @@ -20,15 +20,20 @@
]).head_by(2, [
'benchmark_name','origin'
]).update([
'timestamp=timestamp[0]','Variability=(float)rstd(op_rate)','op_rate=op_rate[0]'
'past_5_rates_ex=op_rate_[i].subVector(1,6)','past_5_rates_in=op_rate','op_rate=op_rate[0]',
'avg_rate_ex=avg(past_5_rates_ex)','var_rate_ex=rstd(past_5_rates_ex)',
'avg_rate_in=avg(past_5_rates_in)'
]).group_by([
'benchmark_name','origin'
]).view([
'Static_Benchmark=benchmark_name.replace(`-Static`,``)',
'Days=round(diffDays(epochMillisToInstant(timestamp[1]),epochMillisToInstant(timestamp[0])))',
'Variability=Variability[0]/100','Rate=op_rate[0]','Change=(float)gain(op_rate[1],op_rate[0])/100'
'Variability=(float)var_rate_ex[0]/100',
'Rate=op_rate[0]',
'Change=(float)gain(avg_rate_ex[0],op_rate[0])/100',
'Since_Release=(float)gain(avg_rate_in[1],op_rate[0])/100'
]).sort([
'Change'
]).head_by(20).format_columns([
'Variability=Decimal(`0.0%`)','Change=Decimal(`0.0%`)'
])
'Variability=Decimal(`0.0%`)','Rate=Decimal(`###,##0`)',
'Change=Decimal(`0.0%`)','Since_Release=Decimal(`0.0%`)'
])
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PublishNotificationTest {
@Test
public void generateSvg() throws Exception {
URL svgTemplate = getClass().getResource("test-publish.template.svg");
Path svgFile = Paths.get(svgTemplate.toURI()).getParent().resolveSibling("worst_since_last_version.svg");
Path svgFile = Paths.get(svgTemplate.toURI()).getParent().resolveSibling("nightly_worst_rate_change.svg");
String svgTemp = Filer.getURLText(svgTemplate);
var p = new PublishNotification(null, svgTemplate, svgFile.getParent());
var t = CachedResultTable.create(plat, "|");
Expand Down Expand Up @@ -70,7 +70,7 @@ public void generateSvg() throws Exception {
@Test
public void generateCsv() throws Exception {
URL svgTemplate = getClass().getResource("test-publish.template.svg");
Path csvFile = Paths.get(svgTemplate.toURI()).getParent().resolveSibling("worst_since_last_version.csv");
Path csvFile = Paths.get(svgTemplate.toURI()).getParent().resolveSibling("nightly_worst_rate_change.csv");
var p = new PublishNotification(null, svgTemplate, csvFile.getParent());
var t = CachedResultTable.create(plat, "|");
t = CachedResultTable.create(csv, "|");
Expand Down

0 comments on commit 3ac28df

Please sign in to comment.