classic benchmarer
This commit is contained in:
		
							
								
								
									
										1
									
								
								benchmark/classic/hello.body
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								benchmark/classic/hello.body
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								benchmark/classic/hello.wrk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								benchmark/classic/hello.wrk
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					wrk.method = "GET"
 | 
				
			||||||
							
								
								
									
										1
									
								
								benchmark/classic/isprime.body
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								benchmark/classic/isprime.body
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					107107
 | 
				
			||||||
							
								
								
									
										26
									
								
								benchmark/classic/isprime.wrk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								benchmark/classic/isprime.wrk
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					wrk.method = "POST"
 | 
				
			||||||
 | 
					wrk.body = "107107"
 | 
				
			||||||
 | 
					done = function(summary, latency, requests)
 | 
				
			||||||
 | 
					  -- open output file
 | 
				
			||||||
 | 
					  f = io.open("result.csv", "a+")
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  -- write below results to file
 | 
				
			||||||
 | 
					  --   minimum latency
 | 
				
			||||||
 | 
					  --   max latency
 | 
				
			||||||
 | 
					  --   mean of latency
 | 
				
			||||||
 | 
					  --   standard deviation of latency
 | 
				
			||||||
 | 
					  --   50percentile latency
 | 
				
			||||||
 | 
					  --   90percentile latency
 | 
				
			||||||
 | 
					  --   99percentile latency
 | 
				
			||||||
 | 
					  --   99.999percentile latency
 | 
				
			||||||
 | 
					  --   duration of the benchmark
 | 
				
			||||||
 | 
					  --   total requests during the benchmark
 | 
				
			||||||
 | 
					  --   total received bytes during the benchmark
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  f:write(string.format("%f,%f,%f,%f,%f,%f,%f,%f,%d,%d,%d\n",
 | 
				
			||||||
 | 
					  latency.min, latency.max, latency.mean, latency.stdev, latency:percentile(50),
 | 
				
			||||||
 | 
					  latency:percentile(90), latency:percentile(99), latency:percentile(99.999),
 | 
				
			||||||
 | 
					  summary["duration"], summary["requests"], summary["bytes"]))
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  f:close()
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										24
									
								
								benchmark/classic/report.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								benchmark/classic/report.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					done = function(summary, latency, requests)
 | 
				
			||||||
 | 
					  -- open output file
 | 
				
			||||||
 | 
					  f = io.open("result.csv", "a+")
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  -- write below results to file
 | 
				
			||||||
 | 
					  --   minimum latency
 | 
				
			||||||
 | 
					  --   max latency
 | 
				
			||||||
 | 
					  --   mean of latency
 | 
				
			||||||
 | 
					  --   standard deviation of latency
 | 
				
			||||||
 | 
					  --   50percentile latency
 | 
				
			||||||
 | 
					  --   90percentile latency
 | 
				
			||||||
 | 
					  --   99percentile latency
 | 
				
			||||||
 | 
					  --   99.999percentile latency
 | 
				
			||||||
 | 
					  --   duration of the benchmark
 | 
				
			||||||
 | 
					  --   total requests during the benchmark
 | 
				
			||||||
 | 
					  --   total received bytes during the benchmark
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  f:write(string.format("%f,%f,%f,%f,%f,%f,%f,%f,%d,%d,%d\n",
 | 
				
			||||||
 | 
					  latency.min, latency.max, latency.mean, latency.stdev, latency:percentile(50),
 | 
				
			||||||
 | 
					  latency:percentile(90), latency:percentile(99), latency:percentile(99.999),
 | 
				
			||||||
 | 
					  summary["duration"], summary["requests"], summary["bytes"]))
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  f:close()
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
		Reference in New Issue
	
	Block a user