Log functionality is needed in recently developed software, and one of the important features is the display of dates and times. So a search on the Internet, search to a large number of date format functions, but compared to the next, the sense of the code is not elegant, and performance is not to force.
Some of the code on the line was evaluated and the results were as follows:
The test code is as follow
, PHP can do this operation: 100+ "Zhoutang", the result is equal to 100. It is because of the weak type language, coupled with the detection and conversion This leads to poor performance in arithmetic operations.
PHP's single operation time is relatively stable, about 10,000 times the arithmetic plus calculation of the time spent about 3.5MS
Different methods of operation also have an effect on performance
Description
Default Value
1
-H
Specify server host Name
127.0.0.1
2
-P
Specify server port
6379
3
-S
Specify server socket
4
-C
Specify the number of concurrent connections
50
5
-N
Specify the number of requests
10000
6
-D
Specifies the data size of the Set/get value in bytes
2
7
-K
1=keep Alive 0=reconnect
1
Today, the Python dictionary has been specifically tested for performance results in comparison with various methods.The test code is as follows:1 defdict_traverse ():2 fromTimeImportClock3My_dict = {'name':'Jim',' Age':' -','Height':'180cm','Weight':'60kg'}4 5T_start =clock ()6 forKeyinchMy_dict:#worst-performing notation. No optimization7 Print 'Type01.01:%s---%s'%(Key, My_dict[key])8T1
performance, is equivalent to a client concurrent 8 thread--------------------------------------------------------------------------------------------------------------- ------------i--test Type, 0 = write, 1 = read, 2 = Random read/write.t--number of threads concurrent how many sub-processes will issue I/O requests.[[Email protected]%ancunkj current]# iozone-w-c-e-I 0-+n-r 64k-s 1g-t 8-f/mnt/dht-iozone-cl
, indicating that concurrency is not enough and that the concurrency is increased to the peak of TPs. If it increases to 100 concurrency, it causes the thread to wait, causing the average response time to change from 1 seconds to 3 seconds, and the TPS from 20 down to 9;TPS and response time are calculated separately, and the two are not computed from each other. Response time and TPS are inversely proportional to each other, but there is no direct re
PHP Project Performance Testing Practical courseCourse View Address: HTTP://WWW.XUETUWUYOU.COM/COURSE/44Courses from the School of worry-free network : http://www.xuetuwuyou.com/This course simulates an e-commerce PHP project, analyzes key points in the project, and introduces typical performance problems through specific actual combat, and analyzes and solves them. In addition to this, the code-level
[-] A preface to the two tasks proposed three realization scheme discussion four technical points explain how to start recording a simplest send and receive packet script write log file a line of Read packet file string convert to hex packet send own defined packet receive packet to custom buffer read out data from custom buffer how to release How the custom buffer is calculated as a decimal number five bar based on the packet return
Absrtact: This paper introduces a
This article is intended to help testers to provide a simple explanation of the performance test common indicators, mainly including CPU, memory, disk and network bandwidth and other system resources, this article is confined to the Linux system, the Windows server system is not considered.I. Analysis of system resourcesLinux system resources are mainly recorded in the kernel file/proc, the following almost
follows:
Serial Number
Options
Description
Default Value
1
-H
Specify the server host name
127.0.0.1
2
-P
Specify server port
6379
3
-S
Specify the server socket
4
-C
Specify number of concurrent connections
50
5
-N
Specify the number of requests
10000
6
-D
Specifies the data size of the Set/get val
Json. NET, fastJSON, ServiceStack. Text simple serialization operation performance test, json. netfastjson
As JSON serialization operations are required in recent projects, we have compared the JSON serialization framework.
Json. NET (Newtonsoft. json) is the most commonly used framework. It is now one of the default reference libraries for Visual Studio Web project templates. fastJSON claims to be the smal
Recently, Phoronix conducted 28 performance comparison tests on the three popular Linux distributions Ubuntu8.04, Fedora9, and Mandriva2008.1 using PhoronixTestSuite1.0 last week. Tested hardware platforms include: Dual AMDOpteron23564-core processor, ATIFireGLV86001GB graphics card, TyanThundern3600M motherboard, 4GBDDR2
Recently, Phoronix conducted 28 performance comparison tests on three popular Linux r
Test Result: Switch performance is higher.Test process: Create a new Win32 Console application and add the following code to the CPP file#include"stdafx.h"#includevoidSwitchtime () { for(inti =0; I 10000000; ++i) {intA = +; Switch(a) { Case 0: A=0; Break; Case 1: A=0; Break; Case 2: A=0; Break; Case 3: A=0; Break; Case 4: A=0; Break; Case 5: A=0; Break; Case 6: A=0; Break; Case 7: A=0; Break;
]# vim index.html
?? ???? ???? #首页添加图片??
2. Modify the master configuration file[Email protected] ~]# vim/etc/httpd/conf/httpd.conf
102 rows or so, open the Deflate module
LoadModule Deflate_module modules/mod_deflate.soAt the end, add the following parameters:
Addoutputfilterbytype DEFLATE text/html text/plain text/css text/xml text/javascript #对html, CSS, and other content enable gzip compressionDeflatecompressionlevel 9
Label: Recently learned about the LEVELDB, found that the embedded K-V data performance is good, so by the way to understand at the level of use. Because LEVELDB also has implementations for. NET, So a simple read-write stress test was conducted for leveldb.net. In order to reflect the test structure more objectively, a large amount of data has been added, and a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.