Changeset 3d4ceaf7c88f65a8fd4418f23abce265c0232516
- Timestamp:
- 10/21/09 19:24:10
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1256153050 +0000
- git-parent:
[f805e6ba6d1f0c796ea6e011688c18a4e56fe9dd]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1256153050 +0000
- Message:
I think this is right, some utc issues and forget to reset v_init to false (for multi-row rollups)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re5e4b41 |
r3d4ceaf |
|
| 48 | 48 | \i sprocs/noit.update_mns_via_self.sql |
|---|
| 49 | 49 | \i sprocs/stratcon.choose_window.sql |
|---|
| | 50 | \i sprocs/stratcon.unroll_metric_numeric_5m.sql |
|---|
| 50 | 51 | \i sprocs/stratcon.fetch_dataset.sql |
|---|
| 51 | 52 | \i sprocs/stratcon.fetch_varset.sql |
|---|
| r32ddc52 |
r3d4ceaf |
|
| 55 | 55 | END IF; |
|---|
| 56 | 56 | |
|---|
| 57 | | FOR v_info IN SELECT * FROM window_robust_derive(v_min_whence) LOOP |
|---|
| | 57 | FOR v_info IN SELECT * FROM stratcon.window_robust_derive(v_min_whence) LOOP |
|---|
| 58 | 58 | |
|---|
| 59 | | v_offset := ( 12*(extract('hour' from v_min_whence))+floor(extract('minute' from v_min_whence)/5) ); |
|---|
| | 59 | v_offset := ( 12*(extract('hour' from v_min_whence at time zone 'UTC'))+floor(extract('minute' from v_min_whence at time zone 'UTC')/5) ); |
|---|
| | 60 | v_info.rollup_time := date_trunc('day', v_info.rollup_time AT TIME ZONE 'UTC') AT TIME ZONE 'UTC'; |
|---|
| 60 | 61 | |
|---|
| | 62 | v_init := false; |
|---|
| 61 | 63 | SELECT * FROM metric_numeric_rollup_5m WHERE rollup_time = v_info.rollup_time AND sid=v_info.sid AND name=v_info.name INTO v_rec; |
|---|
| 62 | 64 | IF NOT FOUND THEN |
|---|
| rf805e6b |
r3d4ceaf |
|
| 1 | 1 | |
|---|
| 2 | | CREATE OR REPLACE FUNCTION stratcon.unroll_numeric_metric_rollup_5m |
|---|
| | 2 | CREATE OR REPLACE FUNCTION stratcon.unroll_metric_numeric_5m |
|---|
| 3 | 3 | (in_sid integer, in_name text, in_start timestamp with time zone, in_end timestamp with time zone) |
|---|
| 4 | 4 | RETURNS SETOF stratcon.metric_numeric_rollup_segment |
|---|