n | Time mult1 (ms) |
Time mult2 (ms) |
Speedup |
---|---|---|---|
10 | 0.011 | 0.014 | -20.5 % |
50 | 0.166 | 0.128 | 29.6 % |
100 | 1.307 | 1.102 | 18.5 % |
500 | 242.1 | 147.4 | 64.2 % |
1000 | 9 347 | 1 244 | 651.2 % |
3000 | 398 619 | 33 846 | 1077.7 % |
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
job "http" { | |
datacenters = ["dc1"] | |
type = "service" | |
update { | |
stagger = "10s" | |
max_parallel = 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
def mult1(m1: Array[Array[Double]], | |
m2: Array[Array[Double]], | |
size: Int): Array[Array[Double]] = { | |
var res = Array.fill(size)(new Array[Double](size)) | |
var i = 0 | |
while (i < size) { | |
var j = 0 | |
while (j < size) { | |
var k = 0 | |
while (k < size) { |
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
def mult2(m1: Array[Array[Double]], | |
m2: Array[Array[Double]], | |
size: Int): Array[Array[Double]] = { | |
var m2t = Array.fill(size)(new Array[Double](size)) | |
var x = 0 | |
while (x < size) { | |
var y = 0 | |
while (y < size) { | |
m2t(x)(y) = m2(y)(x) | |
y += 1 |
Storage | Size |
---|---|
L1i Cache | 32 KB |
L1d Cache | 32 KB |
L2 Cache | 256 KB |
L3 Cache | 4 MB |
Main Memory | 16 GB |
SSD | 500 GB |
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
for s in 10 50 100 250 500 1000 1500 2000 2500 3000 | |
do | |
for m in 1 2 | |
do | |
# Run mult$m with size $s and record CPU counters | |
perf stat -e L1-dcache-loads,L1-dcache-load-misses \ | |
java -jar cpumemory.jar $s $m | |
done | |
done |
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
resource "aws_api_gateway_rest_api" "example" { | |
name = "${local.project-name}" | |
description = "${local.project-name} API" | |
} | |
resource "aws_api_gateway_resource" "example" { | |
rest_api_id = "${aws_api_gateway_rest_api.example.id}" | |
parent_id = "${aws_api_gateway_rest_api.example.root_resource_id}" | |
path_part = "events" | |
} |
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
locals { | |
api-gateway-url = "${aws_api_gateway_deployment.example.invoke_url}/${aws_api_gateway_resource.example.path_part}" | |
} | |
resource "leanix_webhook_subscription" "example" { | |
identifier = "${local.project-name}-${substr(md5(substr(var.leanix_api_token, 0, 4)), 0, 8)}" | |
target_url = "${local.api-gateway-url}" | |
target_method = "POST" | |
active = true | |
workspace_id = "8751abbf-8093-410d-a090-10c7735952cf" |
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
provider "aws" { | |
region = "eu-central-1" | |
} | |
provider "leanix" { | |
url = "${var.leanix_base_url}" | |
api_token = "${var.leanix_api_token}" | |
} |
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 leanix | |
import ( | |
"terraform-provider-leanix/leanix" | |
"github.com/hashicorp/terraform/plugin" | |
"github.com/hashicorp/terraform/terraform" | |
) | |
func main() { |
OlderNewer