diff --git a/studies/db/go_rewrite/main.go b/studies/db/go_rewrite/main.go index e667d321..93d9e78f 100644 --- a/studies/db/go_rewrite/main.go +++ b/studies/db/go_rewrite/main.go @@ -1,7 +1,7 @@ package main import ( - "studies/things" + "studies/runner" ) func main() { @@ -11,9 +11,10 @@ func main() { // Wait forever. // select {} - tp := things.NewThingsProvider(false) + /* tp := things.NewThingsProvider(false) tp.FilterOnlyPrimarySignalSecondarySignalAndCycleSecondDatastreams() tldThings := tp.Things - println("Processing", len(tldThings), "things") + println("Processing", len(tldThings), "things") */ + runner.Run() } diff --git a/studies/db/go_rewrite/meta_stats.json b/studies/db/go_rewrite/meta_stats.json index c6c0e65f..1bb64d70 100644 --- a/studies/db/go_rewrite/meta_stats.json +++ b/studies/db/go_rewrite/meta_stats.json @@ -1,5 +1,6 @@ { "cs_observation_count_total": 961136904, + "intersections_with_observations": 731, "ps_observation_count_total": 1171647438, "things_with_observations": 18104 } \ No newline at end of file diff --git a/studies/db/go_rewrite/processed_things_6.zip b/studies/db/go_rewrite/processed_things_6.zip new file mode 100644 index 00000000..bde3c0e1 Binary files /dev/null and b/studies/db/go_rewrite/processed_things_6.zip differ diff --git a/studies/db/go_rewrite/runner/runner_complete_cell.go b/studies/db/go_rewrite/runner/runner_complete_cell.go index b30d1a3c..381699cd 100644 --- a/studies/db/go_rewrite/runner/runner_complete_cell.go +++ b/studies/db/go_rewrite/runner/runner_complete_cell.go @@ -149,6 +149,8 @@ func RunCompleteCell(tldThings []things.TLDThing, suffixName string) map[string] processedThings[name].Metrics[dayIdx] = thing.Metrics[dayIdx] processedThings[name].MetricsSP[dayIdx] = thing.MetricsSP[dayIdx] processedThings[name].MedianShifts[dayIdx] = thing.MedianShifts[dayIdx] + processedThings[name].ShiftsSum[dayIdx] = thing.ShiftsSum[dayIdx] + processedThings[name].MedianShiftsMedianDeviation[dayIdx] = thing.MedianShiftsMedianDeviation[dayIdx] processedThings[name].MetricsRelativeGreenDistance[dayIdx] = thing.MetricsRelativeGreenDistance[dayIdx] processedThings[name].MedianGreenLengths[dayIdx] = thing.MedianGreenLengths[dayIdx] processedThings[name].Results[dayIdx] = thing.Results[dayIdx] diff --git a/studies/db/go_rewrite/runner/runner_meta_stats.go b/studies/db/go_rewrite/runner/runner_meta_stats.go index dd08f521..55e93032 100644 --- a/studies/db/go_rewrite/runner/runner_meta_stats.go +++ b/studies/db/go_rewrite/runner/runner_meta_stats.go @@ -180,12 +180,10 @@ func RunMeta() { thingsWithObservationsTotal = append(thingsWithObservationsTotal, thingsWithObservations...) for _, thing := range thingsWithObservations { - intersection_name := strings.Replace(thing, "_primary", "", 1) - intersection_name = strings.Replace(intersection_name, "_secondary", "", 1) - intersection_name = strings.Split(intersection_name, "_")[0] + intersection_name := strings.Split(thing, "_")[0] if !stringInSlice(intersectionsWithObservationsTotal, intersection_name) { - intersectionsWithObservationsTotal = append(intersectionsWithObservationsTotal, thing) + intersectionsWithObservationsTotal = append(intersectionsWithObservationsTotal, intersection_name) } } @@ -205,12 +203,10 @@ func RunMeta() { } for _, thing := range thingsWithObservations { - intersection_name := strings.Replace(thing, "_primary", "", 1) - intersection_name = strings.Replace(intersection_name, "_secondary", "", 1) - intersection_name = strings.Split(intersection_name, "_")[0] + intersection_name := strings.Split(thing, "_")[0] if !stringInSlice(intersectionsWithObservationsTotal, intersection_name) { - intersectionsWithObservationsTotal = append(intersectionsWithObservationsTotal, thing) + intersectionsWithObservationsTotal = append(intersectionsWithObservationsTotal, intersection_name) } }