var PvService = require('../service/PvService');
var path = require('path');
var StatisticsServicePV = require('../service/StatisticsService_PV');

var pvService = PvService.create({
    filePath: '../fileStorage/',
    filePrefix: 'pv_',
    fileSuffix: ''
});

var SSPV = new StatisticsServicePV();
SSPV.getEP('20151116', function (err, data) {
    console.log(err, data);
});

//PvService.getPVByDate('201510302220', function (err, data) {
//    pvService.save(data, function (err, data) {
//        console.log(err, data);
//    });
//});
//跑一个页面的多天数据(一次最多20小时)
//PvService.getPVByPageid('169_2122_1', '201510312200' , '201511021000', function (err, data) {
//    console.log('数据回来', err, data);
//    pvService.save(data, function (err, data) {
//        console.log(err, data);
//    });
//});

//pvService.updatePVNow();

//console.log(path.resolve(__dirname,'../fileStorage/'));
@@ -140,16 +140,1157 @@
 e_PV');%0A
+GLOBAL.pjconfig = %7B%0A    %22mysql%22: %7B%0A        %22url%22: %22mysql://badjs:pass4badjs@10.198.30.62:4250/badjs%22%0A    %7D,%0A    %22storage%22: %7B%0A        %22errorMsgTopUrl%22: %22http://10.185.14.28:9000/errorMsgTop%22,%0A        %22errorMsgTopCacheUrl%22: %22http://10.185.14.28:9000/errorMsgTopCache%22,%0A        %22queryUrl%22: %22http://10.185.14.28:9000/query%22,%0A        %22queryCountUrl%22: %22http://10.185.14.28:9000/queryCount%22,%0A        %22querySvgUrl%22: %22http://10.185.14.28:9000/errorCountSvg%22%0A    %7D,%0A    %22acceptor%22: %7B%0A        %22pushProjectUrl%22: %22http://10.185.14.28:9001/getProjects%22%0A    %7D,%0A    %22zmq%22: %7B%0A        %22url%22: %22tcp://10.185.14.28:10000%22,%0A        %22subscribe%22: %22badjs%22%0A    %7D,%0A    %22email%22: %7B%0A        %22homepage%22: %22http://badjs.sng.local/user/index.html%22,%0A        %22from%22: %22badjs-vip@tencent.com%22,%0A        %22emailSuffix%22: %22@tencent.com%22,%0A        %22time%22: %2209:00:00%22,%0A        %22top%22: 20,%0A        %22module%22: %22email_tof%22%0A    %7D,%0A    %22postgreSql%22: %7B%0A        %22connString%22: %22postgres://tdw_v_zscai:234516038@pub-bi-tdw.oa.com:5432/sng_vas_speedtest_database%22%0A    %7D,%0A    %22fileStorage%22: %7B%0A        %22pageid%22: %22./fileStorage/pageid.json%22,%0A        %22threshold%22: %22./fileStorage/threshold.json%22%0A    %7D%0A%7D;
 %0Avar pvS

add config