Skip to content

Instantly share code, notes, and snippets.

View huksley's full-sized avatar
🐈
Step on no pets

Ruslan Gainutdinov huksley

🐈
Step on no pets
View GitHub Profile
@huksley
huksley / myservice.yaml
Created February 20, 2019 09:53
Sample OpenWhisk function manifest
packages:
testapi1:
public: true
version: "0.0.2"
license: "MIT"
actions:
helloJS:
code: |
function main() {
return { payload: 'Hello world' };
@huksley
huksley / gist:4129946bf57c6f83d8359e91cdb2f06f
Created February 14, 2019 09:03
Java8 JAR Validate VAT API calls 50 concurrency 5 cold boot 1.5s
> ab -n 50 -c 5 -T application/json -p example-validate-vat.json -m POST https://deadbeef.execute-api.eu-west-1.amazonaws.com/dev/vat/validate
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking deadbeef.execute-api.eu-west-1.amazonaws.com (be patient).....done
Server Software:
Server Hostname: deadbeef.execute-api.eu-west-1.amazonaws.com
@huksley
huksley / gist:5bf190143d3175c672ee97f41941ffbe
Last active February 14, 2019 09:04
GraalVM compiled native binary Validate VAT API calls 50 concurrency 5 cold boot 1.5s https://github.com/huksley/serverless-java-micronaut
> ab -n 50 -c 5 -T application/json -p example-validate-vat.json -m POST https://deadbeef.execute-api.eu-west-1.amazonaws.com/dev/vat/validate
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking deadbeef.execute-api.eu-west-1.amazonaws.com (be patient).....done
Server Software:
@huksley
huksley / ab-100-concur-20
Last active February 13, 2019 21:59
Call https://github.com/huksley/micronaut-aws-api-gateway-graal deployed as AWS Lambda native Graal image with 100 requests 20 concurrency level
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking xxx.execute-api.eu-west-1.amazonaws.com (be patient).....done
Server Software:
Server Hostname: xxx.execute-api.eu-west-1.amazonaws.com
Server Port: 443
2019-02-13 20:42:28 Found credentials in shared credentials file: ~/.aws/credentials
2019-02-13 20:42:28 Mounting MyServiceFunction at http://127.0.0.1:3000/{proxy+} [GET, DELETE, PUT, POST, HEAD, OPTIONS, PATCH]
2019-02-13 20:42:28 You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template
2019-02-13 20:42:28 * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)
2019-02-13 20:42:35 Invoking example.StreamLambdaHandler::handleRequest (provided)
2019-02-13 20:42:35 Decompressing /home/rgai/src/my-app/build/function.zip
2019-02-13 20:42:35 Requested to skip pulling images ...
2019-02-13 20:42:35 Mounting /tmp/tmpt0UfPN as /var/task:ro inside runtime container
18:42:36.112 [main] INFO i.m.f.a.p.AbstractLambdaContainerHandler - Starting Lambda Container Handler
com.oracle.svm.core.jdk.UnsupportedFeatureError: Unsupported method java.lang.ClassLoader.findLoadedClass(String) is reachable: The declaring class of this element has been substituted, but this element is not present in the substitution class
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:109)
at java.lang.ClassLoader.findLoadedClass(Target_java_lang_ClassLoader.java:1036)
at com.fasterxml.jackson.module.afterburner.util.MyClassLoader.loadAndResolve(MyClassLoader.java:62)
$ ab -n 500 -c 10 https://m1a3p8l323.execute-api.eu-west-1.amazonaws.com/dev/ping
This is ApacheBench, Version 2.3 &lt;$Revision: 1807734 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking m1a3p8l323.execute-api.eu-west-1.amazonaws.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
@huksley
huksley / disastrous-remove-minikube
Created February 9, 2019 21:30
Remove minikube
rm -rf ~/.kube ~/.minikube
sudo rm -Rf /usr/local/bin/kubectl
sudo rm -Rf /usr/local/bin/minikube
sudo rm -Rf /usr/bin/kubeadm
sudo rm -Rf /usr/bin/kubelet
sudo rm -rf /etc/kubernetes/
sudo systemctl stop kubelet.service
sudo systemctl disable kubelet.service
sudo rm -Rf /etc/systemd/system/kubelet.service.d
sudo rm -Rf /lib/systemd/system/kubelet.service
const GraphQLClient = new ApolloClient({
uri: graphqlUrl + '/graphql?',
onError: ({ graphQLErrors, networkError }) => {
logger.log('onError', graphQLErrors, networkError);
}
});
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-116-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Deskstar 7K1000.C
Device Model: Hitachi HDS721010CLA332
Serial Number: JP2940HQ3DJERH
LU WWN Device Id: 5 000cca 35deff8b0
Firmware Version: JP4OA3EA
User Capacity: 1 000 204 886 016 bytes [1,00 TB]