diff --git a/internal/graph/schema.resolvers.go b/internal/graph/schema.resolvers.go index a1e1bb9..3bab7d1 100644 --- a/internal/graph/schema.resolvers.go +++ b/internal/graph/schema.resolvers.go @@ -362,7 +362,7 @@ func (r *queryResolver) JobsStatistics(ctx context.Context, filter []*model.JobF var stats []*model.JobsStatistics // Top Level Defaults - var defaultDurationBins int = 24 + var defaultDurationBins int = 25 var defaultMetricBins int = 10 if requireField(ctx, "totalJobs") || requireField(ctx, "totalWalltime") || requireField(ctx, "totalNodes") || requireField(ctx, "totalCores") || diff --git a/internal/repository/stats.go b/internal/repository/stats.go index ac187a0..3015058 100644 --- a/internal/repository/stats.go +++ b/internal/repository/stats.go @@ -451,15 +451,17 @@ func (r *JobRepository) AddHistograms( start := time.Now() // targetBinCount : Frontendargument - // -> Min Bins: 24 -> Min Resolution: By Hour - // -> In Between Bins: 48 -> Resolution by Half Hour - // 96 -> Resolution by Quarter Hour - // 144 -> Resolution by 10 Minutes - // 288 -> Resolution by 5 Minutes - // 720 -> Resolution by 2 Minutes - // -> Max Bins: 1440 -> Max Resolution: By Minute + // -> Min Bins: 25 -> Min Resolution: By Hour + // -> In Between Bins: 50 -> Resolution by Half Hour + // 100 -> Resolution by Quarter Hour + // 150 -> Resolution by 10 Minutes + // 300 -> Resolution by 5 Minutes + // 750 -> Resolution by 2 Minutes + // -> Max Bins: 1500 -> Max Resolution: By Minute - binSizeSeconds := (86400 / *targetBinCount) + binSizeSeconds := (90000 / *targetBinCount) + + // Important Note: Fixed to 25h max display range -> Too site specific! Configurable or Extend? -> Start view with "classic" by hour histogram, zoom mostly required for "small" runtimes castType := r.getCastType() var err error diff --git a/web/frontend/src/generic/plots/Histogram.svelte b/web/frontend/src/generic/plots/Histogram.svelte index fc2f7e2..8331a9b 100644 --- a/web/frontend/src/generic/plots/Histogram.svelte +++ b/web/frontend/src/generic/plots/Histogram.svelte @@ -41,7 +41,8 @@ points: 2, }; - const binCounts = xtime ? [24, 48, 96, 144, 288, 720, 1440] : [10, 20, 50, 100, 200]; // , 500, 1000 + // TimeBins: Include Hour "24-25" + const binCounts = xtime ? [25, 50, 100, 150, 300, 750, 1500] : [10, 20, 50, 100, 200]; // , 500, 1000 function formatTime(t) { if (t !== null) { @@ -158,7 +159,7 @@ if (key === 'x') { if (zoomableHistogram) { const numX = (u.series[0].idxs[1] - u.series[0].idxs[0]) - if (xtime && numX <= 12 && lastBinCount !== 1440) { + if (xtime && numX <= 12 && lastBinCount !== 1500) { // console.log("Dispatch for Duration: ", numX, lastBinCount, binCounts[binCounts.indexOf(lastBinCount) + 1]) dispatch('zoom', { durationBinCount: binCounts[binCounts.indexOf(lastBinCount) + 1], @@ -201,7 +202,7 @@ label: xlabel, labelGap: 10, size: 25, - incrs: xtime ? [60, 120, 300, 600, 900, 1800, 3600, 7200, 14400] : [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000], + incrs: xtime ? [60, 120, 300, 600, 900, 1800, 3600, 7200, 14400, 18000] : [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000], border: { show: true, stroke: "#000000",