headless

Jvm参数调优

核能气质少年 提交于 2020-12-23 08:31:39
-Xms4096m:初始堆内存4g -Xmx4096m:最大堆内存4g -Xmn1024m:年轻代1g -Xss256K:每个线程占用的空间 -XX:+DisableExplicitGC:禁止显示调用gc -XX:MaxTenuringThreshold=15:在年轻代存活次数 -XX:+UseParNewGC:对年轻代采用多线程并行回收 -XX:+UseConcMarkSweepGC:年老代采用CMS回收 -XX:+CMSParallelRemarkEnabled:在使用UseParNewGC 的情况下, 尽量减少 mark 的时间 -XX:+UseCMSCompactAtFullCollection:在使用concurrent gc 的情况下, 防止 memoryfragmention, 对live object 进行整理, 使 memory 碎片减少 -XX:LargePageSizeInBytes=128m:指定 Java heap的分页页面大小 -XX:+UseFastAccessorMethods:get,set 方法转成本地代码 -XX:+UseCMSInitiatingOccupancyOnly:指示只有在 oldgeneration 在使用了初始化的比例后concurrent collector 启动收集 -XX

Headless Chrome - Sharing Credentials

五迷三道 提交于 2020-12-13 07:34:28
问题 I would like to automate printing a number of URLs. Headless Chrome works beautifully here ... chrome --headless --disable-gpu --print-to-pdf="C:\tmp\test.pdf" https://time.com/ Except that the real site I want to run this on requires authentication. I was hoping that headless Chrome would share cookies with Chrome and therefore all will be hunky-dory. But I am wrong. The print indicates that JavaScript are cookies are disabled, so I can't print what I want. Appreciate if someone could help

Headless Chrome - Sharing Credentials

杀马特。学长 韩版系。学妹 提交于 2020-12-13 07:32:39
问题 I would like to automate printing a number of URLs. Headless Chrome works beautifully here ... chrome --headless --disable-gpu --print-to-pdf="C:\tmp\test.pdf" https://time.com/ Except that the real site I want to run this on requires authentication. I was hoping that headless Chrome would share cookies with Chrome and therefore all will be hunky-dory. But I am wrong. The print indicates that JavaScript are cookies are disabled, so I can't print what I want. Appreciate if someone could help

Headless Chrome - Sharing Credentials

喜夏-厌秋 提交于 2020-12-13 07:32:35
问题 I would like to automate printing a number of URLs. Headless Chrome works beautifully here ... chrome --headless --disable-gpu --print-to-pdf="C:\tmp\test.pdf" https://time.com/ Except that the real site I want to run this on requires authentication. I was hoping that headless Chrome would share cookies with Chrome and therefore all will be hunky-dory. But I am wrong. The print indicates that JavaScript are cookies are disabled, so I can't print what I want. Appreciate if someone could help

locust压测入门

不羁的心 提交于 2020-12-10 19:35:59
一、安装 pip install locust 了解locust相关命令:locust --help 二、获取当前CPU核心数 (后面需要根据核心数起进程) pip3 install psutil ``` import pustil print(pustil.cpu_count(False)) ``` 三、准备压测脚本(lc.py): ``` # 这是一个压测的临时脚本. import requests import json import uuid import time from locust import between, task, constant from locust.contrib.fasthttp import FastHttpUser import random # from utils.data import data data = { "header": [["query"]], "data": [ {"query": "后海大鲨鱼"}, {"query": "这个衣服宽松不"}, {"query": "包装好点"}, ], } class WebsiteUser(FastHttpUser): wait_time = between(1, 1) host = "http://nta-api-ks.leyanbot.com" def body(self):

Run Unity standalone in Headless Mode whilst capturing screenshots

╄→尐↘猪︶ㄣ 提交于 2020-12-04 05:24:30
问题 I need to create a unity project which runs in Headless mode (using the -batchmode command), but it must capture screenshots e.g. every one second and write them out to a file. I understand that in headless mode you need to forcefully call Camera.Render() in order for anything to be rendered. It seems that time freezes after the first screenshot is captured. The first screenshot looks absolutely correct, but all subsequent screenshots are identical to the first, implying that time has frozen.

kubernetes statefulset

╄→尐↘猪︶ㄣ 提交于 2020-12-04 02:32:56
概述 在应用程序中我们有两类,一种是有状态一种是无状态。此前一直演示的是deployment管理的应用,比如nginx或者我们自己定义的myapp它们都属于无状态应用。 而对于有状态应用,比如redis,mysql,还有etcd,还有zookeeper等等需要存数据的都属于有状态。它们不光有所谓的节点之分,每一个对应的pod还有角色之分,有的是主节点,有的是从节点。而后,从节点不光有所谓的从之分可能还有先后次序之分,我们不同的分布式系统它们的运维管理,逻辑和运维操作过程是不相同的,因此没有办法把一种控制器把每一种功能都同步进来让我们非常简单的去操作这些有状态的应用,几乎没有任何控制器能做到,后来即便有了 statefulset我们去用其实现真正功能控制时也是极其麻烦的。所以我们说statefulset即便在应用程度上能在一定程度上能实现有状态应用的管理效果,但我们需要自行把我们对某个应用的运维管理过程写成脚本注入到statefulset的应用文件中才能使用,但是稍有不慎就会有问题。好在k8s支持所谓叫做TPR,后来改成CRD了(第三方资源或自定义资源)这种机制,甚至于还支持其它更为复杂的机制比如叫api聚合,当我们使用api聚合时就需要自己去修改k8s源代码增强我们自己所需要功能,对大多数人来讲这是不可能的任务,因为它是使用GO语言开发的

Spring Boot 2.0系列文章(七):SpringApplication 深入探索

感情迁移 提交于 2020-11-26 04:00:18
关注我 转载请务必注明原创地址为: http://www.54tianzhisheng.cn/2018/04/30/springboot_SpringApplication/ 前言 在 Spring Boot 项目的启动类中常见代码如下: @SpringBootApplication public class SpringbotApplication { public static void main(String[] args) { SpringApplication.run(SpringbotApplication.class, args); } } 其中也就两个比较引人注意的地方: @SpringBootApplication SpringApplication.run() 对于第一个注解 @SpringBootApplication ,我已经在博客 Spring Boot 2.0系列文章(六):Spring Boot 2.0中SpringBootApplication注解详解 中详细的讲解了。接下来就是深入探究第二个了 SpringApplication.run() 。 换个姿势 上面的姿势太简单了,只一行代码就完事了。 SpringApplication.run(SpringbotApplication.class, args); 其实是支持做一些个性化的设置

Do headless web browser need selenium WebDriver?

生来就可爱ヽ(ⅴ<●) 提交于 2020-11-25 04:27:49
问题 I am trying to use headless web browser(such as headless chrome) for our selenium tests.Should I have to use selenium WebDriver(for python or c# bindings)? 回答1: Headless Chrome As per Getting Started with Headless Chrome the Headless Chrome is the server environment where you don't need a visible UI shell. If you've got Chrome 59+ installed, you start Chrome with the --headless flag as follows: chrome \ --headless \ # Runs Chrome in headless mode. --disable-gpu \ # Temporarily needed if

Do headless web browser need selenium WebDriver?

試著忘記壹切 提交于 2020-11-25 04:27:11
问题 I am trying to use headless web browser(such as headless chrome) for our selenium tests.Should I have to use selenium WebDriver(for python or c# bindings)? 回答1: Headless Chrome As per Getting Started with Headless Chrome the Headless Chrome is the server environment where you don't need a visible UI shell. If you've got Chrome 59+ installed, you start Chrome with the --headless flag as follows: chrome \ --headless \ # Runs Chrome in headless mode. --disable-gpu \ # Temporarily needed if