Notification on Create Users

117 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Augusto César Dias

ungelesen,
24.03.2014, 07:32:2724.03.14
an gat...@googlegroups.com
Hi,

I've created a test and it is running and giving me metrics perfectly, but the thing is that my boss wants to track the test and see what's happening in real time.
He basically wants to see when a user is created by gatling. I've downloaded the code to see if there's some kind of notification feature but I didn't find anything.
Do you know if there's some way to achieve what I need to do?
And about the code, the developing section of the wiki is outdated right? because I didn't find any pom.xml in the master of the project.

Thank you very much.

Augusto

nicolas...@gmail.com

ungelesen,
24.03.2014, 07:33:5524.03.14
an gat...@googlegroups.com, gat...@googlegroups.com
Best would be to use Graphite, Gatling can exports some metrics live in there. 

Cheers
Nicolas


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Augusto

ungelesen,
24.03.2014, 07:36:1524.03.14
an gat...@googlegroups.com
I've just seen a topic here about it...
Searching about :)

thank you

On Mon, Mar 24, 2014 at 8:33 AM, <nicolas...@gmail.com> wrote:
Cheers



--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias

Augusto César Dias

ungelesen,
25.03.2014, 07:57:4125.03.14
an gat...@googlegroups.com
Let me ask you something:
Is the create section in graphite the create users I want?
I've seen there's a DataWriter in the code... Is it possible and is there any doc to write a new one?

Thanks,

Augusto

Augusto César Dias

ungelesen,
25.03.2014, 09:42:2725.03.14
an gat...@googlegroups.com
I've tried to put the JDBC writer there, but there's an error when it tries to save:

java.sql.SQLException: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate() or Connection.prepareStatement().
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
        at com.mysql.jdbc.StatementImpl.getGeneratedKeys(StatementImpl.java:2061)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$10$$anonfun$apply$11.apply(JdbcDataWriter.scala:96)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$10$$anonfun$apply$11.apply(JdbcDataWriter.scala:91)
        at io.gatling.jdbc.util.SQLHelper$.withStatement(SQLHelper.scala:31)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$10.apply(JdbcDataWriter.scala:91)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$10.apply(JdbcDataWriter.scala:81)
        at scala.Option.foreach(Option.scala:236)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9.apply(JdbcDataWriter.scala:81)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8$$anonfun$apply$9.apply(JdbcDataWriter.scala:80)
        at scala.Option.foreach(Option.scala:236)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8.apply(JdbcDataWriter.scala:80)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3$$anonfun$apply$8.apply(JdbcDataWriter.scala:79)
        at scala.Option.foreach(Option.scala:236)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3.apply(JdbcDataWriter.scala:79)
        at io.gatling.jdbc.result.writer.JdbcDataWriter$$anonfun$onInitializeDataWriter$3.apply(JdbcDataWriter.scala:78)
        at scala.Option.foreach(Option.scala:236)
        at io.gatling.jdbc.result.writer.JdbcDataWriter.onInitializeDataWriter(JdbcDataWriter.scala:78)
        at io.gatling.core.result.writer.DataWriter$$anonfun$uninitialized$1.applyOrElse(DataWriter.scala:92)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
        at akka.actor.ActorCell.invoke(ActorCell.scala:456)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
        at akka.dispatch.Mailbox.run(Mailbox.scala:219)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:385)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

On Monday, March 24, 2014 8:33:55 AM UTC-3, Nicolas Rémond wrote:

Stéphane Landelle

ungelesen,
25.03.2014, 09:54:1525.03.14
an gat...@googlegroups.com
Rich. Another crap for the mysql JDBC driver...

I'll be frank: this DataWriter is not polished, we don't use it and don't really maintain it, and have no idea about its performance impact.

If it doesn't find a maintainer, it might be extracted and moved to a dedicated project.

Augusto

ungelesen,
25.03.2014, 09:56:0925.03.14
an gat...@googlegroups.com
How to build the project?

I don't see any pom.xml there? 

Stéphane Landelle

ungelesen,
25.03.2014, 09:57:1825.03.14
an gat...@googlegroups.com
Gatling now builds with sbt: http://www.scala-sbt.org/


--

Stéphane Landelle

ungelesen,
25.03.2014, 10:04:2225.03.14
an gat...@googlegroups.com

Augusto César Dias

ungelesen,
25.03.2014, 17:29:4625.03.14
an gat...@googlegroups.com
Thank you.

I've seen the code and I found out I can extend the DataWriter class and create a block on config file.
But I was testing the JDBC and I found an issue:
First there's a missing commit after the executeUpdate on line 96 of JdbcDataWriter
I don't know why, but I its actor become unitialized and every time I see a "Can't handle RequestMessage" in the log. Is it possible that Akka is destroying the Actor?

Stéphane Landelle

ungelesen,
25.03.2014, 17:36:2625.03.14
an gat...@googlegroups.com

First there's a missing commit after the executeUpdate on line 96 of JdbcDataWriter

 
I don't know why, but I its actor become unitialized and every time I see a "Can't handle RequestMessage" in the log. Is it possible that Akka is destroying the Actor?

Because for a reason, an Exception was raised, the Actor crashed, and was automatically re-created in its initial state.
What is the initial exception you get?

Harold Nyikal

ungelesen,
25.03.2014, 19:09:2325.03.14
an gat...@googlegroups.com
I have been able to write a DataWriter that writes to OpenTSDB for real time monitoring of the gatling run. Once you implement the DataWriter interface, you just need to add your datawriter to gatling.conf like this:

data {
writers = "console, file, com.box.gatling.opentsdb.TSDBDataWriter"
        ...
}

you would also need to have your jar with the class in ./lib dir in the gatling package.

~Harold.

Stéphane Landelle

ungelesen,
26.03.2014, 05:44:4226.03.14
an gat...@googlegroups.com
Man, one more thing to investigate in the TODO list... :)

Thanks for the information.

Augusto

ungelesen,
26.03.2014, 07:36:5526.03.14
an gat...@googlegroups.com
I can't see any Exception being thrown by gatling in the log...
I'll put more logs int the jdbcdatawriter and test if see where it stops working

--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias


--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/xXhPWQc2ZK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

Augusto

ungelesen,
26.03.2014, 08:07:0726.03.14
an gat...@googlegroups.com
I've figured out the problem is when it calls executeBatchUpdate but it does not throw any exception...

--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias


--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/xXhPWQc2ZK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

Stéphane Landelle

ungelesen,
26.03.2014, 08:13:2026.03.14
an gat...@googlegroups.com
We weren't logging actor crashes for DataWriters, this is fixed: https://github.com/excilys/gatling/issues/1746

Maybe this will help investigating.

Augusto

ungelesen,
26.03.2014, 08:50:5626.03.14
an gat...@googlegroups.com
I've found the problem. The create table in the gatling.conf defined userId as int and in the app it is as a String.

Stéphane Landelle

ungelesen,
26.03.2014, 08:53:2026.03.14
an gat...@googlegroups.com
Great job!
Indeed, the userId type was changed.

I'm fixing this ASAP.


--

Stéphane Landelle

ungelesen,
26.03.2014, 09:08:3726.03.14
an gat...@googlegroups.com

Augusto

ungelesen,
26.03.2014, 10:39:2626.03.14
an gat...@googlegroups.com
Thank you very much.
I really liked the project and the support here
I'll develop a TCPDataWriter and a web application to manage, run and monitor the tests :)

--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias


--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/xXhPWQc2ZK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

Augusto

ungelesen,
26.03.2014, 17:33:0926.03.14
an gat...@googlegroups.com
Hi,

I'm developing the TCPDataWriter and I'm with some doubts...
I've used the JdbcDataWriter as a model and when I init the test it throws an exception saying the actor can't receive the Init message
java.lang.IllegalArgumentException: Actor TCPDataWriter doesn't support message Init(RunMessage(com.mv.NavigationSimulation,navigationsimulation,2014-03-26T18:09:04.683-03:00,navigationsimulation),List(ShortScenarioDescription(Ricardo Eletro Users,1)))
Why the JdbcDataWriter goes fine and my class not?

When I finish, should I make a pull request? (if you want this in your project) And how to do it (never did a pull request)

Best regards,

Stéphane Landelle

ungelesen,
26.03.2014, 17:44:1026.03.14
an gat...@googlegroups.com
Hey,

What does your TCPDataWriter do exactly? What's the format of the messages?

A gist would help.

If your component is generic and can be reused, why not. If I think we'll have some kind of "extras" projet.

Cheers,

Stéphane



--

Augusto

ungelesen,
26.03.2014, 18:12:3726.03.14
an gat...@googlegroups.com

It opens a socket with a host and send the data through it. I'm testing with objectoutputstream but I'm thinking about json...

You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/xXhPWQc2ZK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

Augusto

ungelesen,
27.03.2014, 07:39:2527.03.14
an gat...@googlegroups.com
And do you know what can be causing this issue of the actor doesn's supporting the Init message?

--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias


Stéphane Landelle

ungelesen,
27.03.2014, 07:44:3227.03.14
an gat...@googlegroups.com
No.

My2cents: the problem is in your code. DataWriters have a lifecycle defined in the DataWriter class, it seems you're note overriding the proper methods.

Augusto

ungelesen,
27.03.2014, 15:53:0627.03.14
an gat...@googlegroups.com
I'm doing the writer and I'm with a problem...
When I try to connect to a server to send the data and it fails, I terminate the DataWriter, but I need to connect after the intialization of the DataWriter because only after this, the DataWriter will accept Terminate messages. If I just ignore, the actor crashes and it creates an infinite loop trying to connect.
What I did:
I've created a lazy val to hold the connection actor and only when the first message arrives it will trigger the connect.

lazy val msgSender = actor(context)(new TCPMessageSender(context.self))

override def onRequestMessage(request: RequestMessage) = {
    msgSender forward request
  }

It works, but there's a problem. Some messages are sent to the connection actor before it connects, so I have to dicard or buffer them.
I don't want to do any of this approachs. Do you have any idea on how I can force the connect being triggered after the initialization of the DataWriter or how to solve this problem (or if a just discard or buffer the messages)? 

Thanks

--

Augusto César Dias

Facebook Twitter Google Talk augusto.c.dias Skype augustoc.dias


Stéphane Landelle

ungelesen,
27.03.2014, 21:34:5127.03.14
an gat...@googlegroups.com
Have a look at the GraphiteDataWriter.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten