Coder Social home page Coder Social logo

cloudspannerecosystem / machmeter Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 20.0 4.09 MB

Quickly perform Cloud Spanner POCs using Machmeter.

Home Page: https://cloudspannerecosystem.dev/machmeter/

License: Apache License 2.0

HCL 26.81% Java 71.73% Shell 1.46%
cloud-spanner gcp google-cloud-platform spanner

machmeter's People

Contributors

aksharauke avatar ansh0l avatar arpan14 avatar gauravpurohit06 avatar gcpjaru avatar harshachinta avatar kinsaurralde avatar manitgupta avatar manu2 avatar movsic avatar rahul2393 avatar rickygodoy avatar rohit-h avatar surbhigarg92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machmeter's Issues

Relative path instead of absolute being applied

In some points such gkeConfig/service_account_json and ddlConfig/schemaFilePath the file is handled as absolute.

However, in others such jMeterTemplatePath, it's being handled as relative to the current solution, which is confusing and made me move my configurations to the solution folder to work.

Got the problem during the following command:
kubectl cp %s -n %s \"$(kubectl get po -n %s | grep jmeter-master | awk '{print $1}'):/%s\"")

which concatenated path twice:
/Users/rgodoy/Documents/machmeter/machmeter/Users/rgodoy/Downloads/machmeter-confs/templates/data-load.jmx

Narrow down permissions, owner is too much

The service account needs an owner role to run, which is not reasonable to ask for. It's very risky and many customers won't be able to provision it, even in dev environments.

A solution would be to give least-privilege permissions to it in order to prevent accidents. It could also be created using the terraform as well.

Make it possible to run using Docker

It would be awesome to have a Dockerfile so it could run the solution easily in Cloud Run without the need for install and care about dependencies.

Java style comments are invalid in .sql files

A sample -

This results in errors like -

eb 22, 2023 8:46:12 AM com.google.cloud.machmeter.Orchestrator executeOrchestrator
INFO: Plugin infraSetup completed.
Feb 22, 2023 8:46:12 AM com.google.cloud.machmeter.Orchestrator executeOrchestrator
INFO: Executing ddlPlugin plugin.
/*
 * Copyright 2022 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License")

Error executing: /*
 * Copyright 2022 Google Inc.

Failure to contact K8s cluster hangs the `execute` step

A sample failure during the execute step where the cluster configuration kubectl was different from the cluster created in setup step -

Mar 02, 2023 11:21:55 AM com.google.cloud.machmeter.plugins.ExecutePlugin execute
INFO: Executing kubectl cp /usr/local/google/home/sunnsing/git/machmeter/machmeter/usecases/gaming/online-matchmaking/templates/data-load.jmx -n spanner-test "$(kubectl get po -n spanner-test | grep jmeter-master | awk '{print $1}'):/data-load.jmx"
Unable to connect to the server: dial tcp 34.171.187.3:443: connect: connection timed out
error: filespec must match the canonical format: [[namespace/]pod:]file/path
Fail!

Mar 02, 2023 11:23:22 AM com.google.cloud.machmeter.plugins.ExecutePlugin lambda$execute$0
INFO: Shutting down the execute...
^CFail!

^C^C^C^C^C^C

The shell process doesn't respond to ^C and the relevant Java process has to be force killed.

Expected - Shutdown should happen by-itself or at least respond to SIGINT and then get killed.

Impersonate instead of downloading SA keys

According to documentation, it's needed to create a service account and have it downloaded to local machine, which pose a major risks to the solution and bad example to follow.

A solution would be to impersonate the service account in order to prevent accidents. Would be great to be able to run with local logged user instead of only service accounts. Also use ADC to authenticate (https://cloud.google.com/docs/authentication/application-default-credentials).

That would make the solution more secure and easy to run!

Solution hangs when fail

If something goes wrong with the execution, it hangs and won't exit even with cmd + C/cmd + d, had to kill -9 it.

image

Does not select the correct cluster before running commands

When trying to follow the sample tutorial, in a given step Machmeter does not select the correct cluster before running commands, such as kubectl get po -n spanner-test, causing the solution not to find the resources and not be able to continue (No resources found in spanner-test namespace.)

error during JRMP connection establishment

When configuring slave workers/replicas (eg. ~20 replicas) , and configure non-default threads count (e.g. 500) , some of replicas throws the following errors

2023-02-17 03:08:58,420 ERROR o.a.j.t.RemoteThreadsListenerWrapper: Exception invoking listener on threadStarted.
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300) ~[?:?]
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196) ~[?:?]
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:132) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162) ~[?:?]
at com.sun.proxy.$Proxy19.threadStarted(Unknown Source) ~[?:?]
at org.apache.jmeter.threads.RemoteThreadsListenerWrapper.threadStarted(RemoteThreadsListenerWrapper.java:51) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:797) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) ~[jorphan.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) ~[jorphan.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:765) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:753) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:264) ~[ApacheJMeter_core.jar:5.5]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.