Authored by yyq

Merge branch 'feature/qps' of git.yoho.cn:fe/yohobuy-node into feature/qps

... ... @@ -70,15 +70,11 @@ const link = (req, res, next) => {
res.render('link', responseData);
}).catch(next);
};
const test = (req, res) => {
res.send('hi');
};
module.exports = {
yohobuy,
newpower,
contact,
privacy,
link,
test
link
};
... ...
... ... @@ -13,6 +13,5 @@ router.get('/newpower.html', aboutCtrl.newpower);
router.get('/contact.html', aboutCtrl.contact);
router.get('/privacy.html', aboutCtrl.privacy);
router.get('/link.html', aboutCtrl.link);
router.get('/test.html', aboutCtrl.test);
module.exports = router;
... ...
... ... @@ -67,8 +67,6 @@ router.get(['/index', '/'], tabsMiddleware.getCommonHeaderNew, indexController.i
router.get('/index/newsAvatar', checkLogin, indexController.newsAvatar);
router.get('/index/async', checkLogin, indexController.asyncData);
// router.get(['/index', '/'], tabsMiddleware.getCommonHeader, indexController.index);
// 查看二维码
router.get('/QRcode', tabsMiddleware.getCommonHeader, personalController.QRcode);
... ...
... ... @@ -2,7 +2,7 @@
<p class="title ucenter"></p>
<div class="user-thumb">
<div class="thumb-bg">
<img id="user-thumb">
<img id="user-thumb" src="{{image2 userThumb w=100 h=100}}">
</div>
</div>
{{# homeNav}}
... ...
... ... @@ -1654,7 +1654,7 @@ exports.getCriteo = (glist) => {
// handlePagerData
exports.getSearchParams = params => {
let mlimit = 59;
let mlimit = 39;
if (params && params.limit) {
... ... @@ -1668,7 +1668,7 @@ exports.getSearchParams = params => {
mlimit = 199;
break;
default:
mlimit = 59;
mlimit = 39;
}
}
... ...
... ... @@ -77,7 +77,7 @@ module.exports = {
db: 'web-apm'
},
useOneapm: false,
useCache: false,
useCache: true,
memcache: {
master: ['127.0.0.1:11211'],
slave: ['127.0.0.1:11211'],
... ... @@ -92,7 +92,7 @@ module.exports = {
infoFile: {
close: true,
name: 'info',
level: 'error',
level: 'info',
filename: 'logs/info.log',
maxFiles: 14
},
... ...
... ... @@ -28,6 +28,4 @@ module.exports = app => {
// 第三方,如广告联盟
app.use('/3party', require('./apps/3party'));
app.use('/service', require('./apps/service')); // 客服
app.get('/benchmark', require('./mem'));
};
... ...
const cache = global.yoho.cache;
const data = require('./test.json');
const benchmark = require('./utils/benchmark');
const cachedSet = benchmark(cache.set, cache);
const cachedGet = benchmark(cache.get, cache);
async function benchmarkMem(req, res) {
console.log('memcache write');
for (let i = 0; i < 100; i++) {
await cachedSet(`cache:${1}`, data);
}
console.log('memcache get');
for (let i = 0; i < 100; i++) {
let result = await cachedGet(`cache:${i}`);
if (result) {
console.log('memcached get');
}
}
res.json({code: 200, message: ''});
}
module.exports = benchmarkMem;
This diff could not be displayed because it is too large.
{
"name": "yohobuy-node",
"version": "5.9.94",
"version": "5.9.93",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -55,7 +55,7 @@
"urlencode": "^1.1.0",
"uuid": "^2.0.2",
"yoho-express-session": "^2.0.0",
"yoho-node-lib": "=0.5.11",
"yoho-node-lib": "=0.5.14",
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
... ...
... ... @@ -85,20 +85,6 @@ if (window.cookie('__NEW_USER')) {
});
}
// if (window.cookie('_UID')) {
// // 判断是否有新人专享
// $.ajax({
// type: 'GET',
// url: '/channel/isNewUserAjax',
// data: {},
// success: function(res) {
// if (!res.isNewUser) {
// $('.new-user').addClass('hide');
// }
// }
// });
// }
if (mChannel !== '') {
/** ***** 埋点 *******/
// banner埋点
... ...
This diff could not be displayed because it is too large.