Lang | Buffer Size | 100c/10s | 100c/60s |
---|---|---|---|
Go | 1kb | 475.944 Mbps | 437.203 Mbps |
Go | 8kb | 1993.027 Mbps | 1976.818 Mbps |
Go | 16kb | 2027.369 Mbps | 2048.668 Mbps |
Rust | 1kb | 1672.325 Mbps | 1661.514 Mbps |
Rust | 8kb | 2242.304 Mbps | 2385.639 Mbps |
Rust | 16kb | 2121.545 Mbps | 2197.390 Mbps |
This file contains hidden or 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 ( | |
"fmt" | |
"github.com/fsnotify/fsnotify" | |
"os" | |
"io" | |
) | |
func main() { |
This file contains hidden or 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 ( | |
"fmt" | |
"net" | |
) | |
func main() { | |
ip := net.ParseIP("1.2.3.4") | |
mask := net.IPMask(net.ParseIP("255.255.0.0")) |
This file contains hidden or 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
func main() { | |
defer func() { | |
if r := recover(); r != nil { | |
panic("never called") | |
} | |
}() | |
// fatal error: concurrent map writes | |
m := make(map[int]int) | |
for i := 0; i < 100; i++ { |
This file contains hidden or 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] | |
name = "drain" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
lru = "0.11" |
This file contains hidden or 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
# Test file that create a single group "sys_admin" and to users "test" and "test2" | |
# Passwords are always: test | |
version: 1 | |
# Entry 1: ou=groups,dc=example,dc=org | |
dn: ou=groups,dc=example,dc=org | |
objectclass: organizationalUnit | |
objectclass: top | |
ou: groups |
This file contains hidden or 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
# nb -v run driver=http yaml=http-rest-timeseries tags=phase:schema host=my_stargate_host stargate_host=my_stargate_host auth_token=$AUTH_TOKEN | |
description: | | |
This workload emulates a time-series data model and access patterns. | |
This should be identical to the cql variant except for: | |
- We can't specify the write timestamp to make the write idempotent like we can with cql. | |
- The `time` binding has to have a StringDateWrapper to get the exact format that the REST API needs; See https://github.com/stargate/stargate/issues/532. | |
- We need to URLEncode the `data` binding because newlines can't be sent in REST calls. | |
- Schema creation is cql of the lack of being able to define compaction strategy in the REST API. | |
- There is no instrumentation with the http driver. | |
- There is no async mode with the http driver. |
This file contains hidden or 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 sugar | |
import ( | |
"errors" | |
"github.com/stargate/stargate-grpc-go-client/stargate/pkg/client" | |
pb "github.com/stargate/stargate-grpc-go-client/stargate/pkg/proto" | |
"google.golang.org/grpc" | |
) |
This file contains hidden or 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
func NewClusterFromBundle(bundlePath string) (*gocql.ClusterConfig, error) { | |
reader, err := zip.OpenReader(bundlePath) | |
if err != nil { | |
return nil, err | |
} | |
defer reader.Close() | |
contents := make(map[string][]byte) |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 4.
This file contains hidden or 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
cli-arguments | |
--type selectrate --num-io-threads 1 --hosts 127.0.0.1 --num-core-connections 1 --data-size 1048576 --num-partition-keys 99 --request-rate 70 --num-requests 10000 | |
cli-full-arguments | |
--hosts "127.0.0.1" --type selectrate --label "" --protocol-version 0 --num-threads 1 --num-io-threads 1 --num-core-connections 1 --coalesce-delay -1 --num-requests 10000 --num-concurrent-requests 5000 --num-partition-keys 99 --data-size 1048576 --request-rate 70 --batch-size 1000 --log-level 2 --sampling-rate 2000 --use-token-aware 1 --use-prepared 1 --use-ssl 0 --use-stdout 0 | |
driver version, server version, num nodes | |
2.16.2, cassandra-4.0.2, 1 |
NewerOlder