Importing historical summed data gives weird aggregated result
Hi,
I apologize for a quite long question. I tried to keep it short and concise.
Version of graphite: Latest from pip=0.9.9
I am trying to import a timeseries containing the value "1" when a certain event has happened. My idea is to visualize how many times this event happened for example per hour, day or week. Obviously doing this requires me to use an xFilesFactor=0 (since a lot of times will not have any values) and aggregationMeth
However, my import does not seem to be giving me reasonable values; I am getting values of 1:s far back in time despite the fact that I know they should have happened more. My theory is that it has to do with the fact that aggregationMeth
Since I wasn't sure the expected behaviour when setting the same value over and over again (https:/
To try to figure out whether I am on the right track I made two test scripts:
Script 1:
=======
#!/usr/bin/bash
rm -f test.wsp
whisper-create.py --xFilesFactor=0 --aggregationMe
CREATED=$(date +%s)
echo "Created: $CREATED"
whisper-update.py test.wsp $((CREATED)):1
whisper-update.py test.wsp $((CREATED-1)):1
whisper-update.py test.wsp $((CREATED-2)):1
whisper-update.py test.wsp $((CREATED-3)):1
whisper-update.py test.wsp $((CREATED-4)):1
echo
echo Using 1s resolution:
whisper-fetch.py --from=
echo
echo Using 5s resolution:
whisper-fetch.py --from=
=======
Output from script 1:
=======
$ time bash test.sh
Created: test.wsp (124 bytes)
Created: 1334305281
Using 1s resolution:
1334305280 2.000000
Using 5s resolution:
1334305265 None
1334305270 None
1334305275 1.000000
1334305280 2.000000
real 0m0.164s
user 0m0.130s
sys 0m0.050s
=======
My question is; How come only 3 (or sometimes 2) values are only registered here? Is this a bug? Sure, I can understand this script might running across two seconds, but that wouldn't yield this result, right?
I also made a second test script 2:
=======
#!/usr/bin/bash
rm -f test.wsp
whisper-create.py --xFilesFactor=0 --aggregationMe
CREATED=$(date +%s)
echo "Created: $CREATED"
whisper-update.py test.wsp $((CREATED)):1
whisper-update.py test.wsp $((CREATED-1)):1
whisper-update.py test.wsp $((CREATED-2)):1
whisper-update.py test.wsp $((CREATED-3)):1
whisper-update.py test.wsp $((CREATED-4)):1
whisper-update.py test.wsp $((CREATED-5)):1
whisper-update.py test.wsp $((CREATED-6)):1
whisper-update.py test.wsp $((CREATED-7)):1
whisper-update.py test.wsp $((CREATED-8)):1
whisper-update.py test.wsp $((CREATED-9)):1
echo "Before resizing:"
whisper-fetch.py --from=
echo
whisper-resize.py --xFilesFactor=0 --aggregationMe
echo "After resizing:"
whisper-fetch.py --from=
=======
The output of script 2:
=======
$ time bash test2.sh
Created: test.wsp (268 bytes)
Created: 1334305511
Before resizing:
1334305492 None
1334305493 None
1334305494 None
1334305495 None
1334305496 None
1334305497 None
1334305498 None
1334305499 None
1334305500 None
1334305501 None
1334305502 1.000000
1334305503 1.000000
1334305504 1.000000
1334305505 1.000000
1334305506 1.000000
1334305507 1.000000
1334305508 1.000000
1334305509 1.000000
1334305510 1.000000
1334305511 1.000000
Retrieving all data from the archives
Creating new whisper database: test.wsp.tmp
Created: test.wsp.tmp (124 bytes)
Migrating data...
Renaming old database to: test.wsp.bak
Renaming new database to: test.wsp
After resizing:
1334305500 1.000000
real 0m0.280s
user 0m0.200s
sys 0m0.090s
=======
My question is; Why doesn't "After resizing" value have a value of "10"? Am I getting something wrong here?
Thanks,
Jens
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Graphite Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jens Rantil
- Solved:
- Last query:
- Last reply: