$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.71ms 3.16ms 23.05ms 69.17%
Req/Sec 3.44k 1.98k 7.80k 58.22%
63697 requests in 2.00s, 17.86MB read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Core | |
import Cleanse | |
public class FeatureX{ | |
public init(){ | |
// _ = CoreDummy() | |
let f = try! ComponentFactory.of(APIComponent.self) | |
RootViewController2(loggedInComponent: f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
class Custom{ | |
private String name; | |
Custom(String name){ | |
this.name = name; | |
} | |
protected void finalize(){ | |
// System.out.println("gc'd"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
class HTTPClient{ | |
private HttpRequest request; | |
private HttpClient client; | |
private LoggerM logger; | |
@Inject | |
HTTPClient(LoggerM logger) { |
Moved to git repository: https://github.com/denji/golang-tls
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let accounts = [BankAccount(accountNumber: 1,initialDeposit: 100),BankAccount(accountNumber: 2,initialDeposit: 100),] | |
let q0 = DispatchQueue(label: "queue0", attributes: .concurrent) | |
q0.async | |
{ | |
do { | |
accounts.forEach { | |
account in | |
async { | |
try await account.transfer(amount: 1, to: accounts[1]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
actor BankAccount { | |
let accountNumber: Int | |
var balance: Double | |
init(accountNumber: Int, initialDeposit: Double) { | |
self.accountNumber = accountNumber | |
self.balance = initialDeposit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class test{ | |
//takes package parent class | |
init(package: Package,price :Int64) { | |
do{ | |
try 8 * 100/package.setPrice(price:price) | |
print("done") | |
}catch { | |
print("price value must be greater than 0 _ \(price) ") | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Free : Package { | |
override func setPrice(price : Int64)throws ->Int64 { | |
return 0 //weakened post condition | |
} | |
} |