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
description: | | |
A workload with only text keys and text values. | |
This workload is rather simple but it is useful for demonstration purposes. | |
If you want a more thorough example, you might be interested in the | |
baselinesv2/cql-* workloads. | |
defaults: | |
TEMPLATE(keyspace,baselines) | |
TEMPLATE(table,keyvalue) | |
bindings: |
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) |
NewerOlder