Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time axis value is coming wrong #85

Open
CherukuriNaveen opened this issue Aug 26, 2020 · 4 comments
Open

Time axis value is coming wrong #85

CherukuriNaveen opened this issue Aug 26, 2020 · 4 comments
Assignees
Labels

Comments

@CherukuriNaveen
Copy link

I am able to draw different plots for tracers interlatency, proctime and etc.
But in all plot diagrams, I am getting time axis wrong.

In example diagram : https://developer.ridgerun.com/wiki/index.php?title=File:Test_proctime_plot.png, I could see time scale is 0, 0.5sec, 1sec, 1.5sec and so on.

But when I plot, I am getting time axis as 0, 41401, 41402, 41403 and so on.

How to get timescale like shown in your examples ?

I am using Ubuntu version : 18.04
Gstreamer : 1.16

Thank you
Naveen

@michaelgruner
Copy link
Collaborator

I'm sorry for the very slow response. @mleivaf can you check on this?

@mleivaf
Copy link
Contributor

mleivaf commented Oct 22, 2020

Hello,

The steps in the X axis are defined automatically by the plot (plot_tracer.m#L150)

But you can force the plot to get the steps required by you. For example:

GST_SHARK_LOCATION=./proctime GST_DEBUG="GST_TRACER:7" GST_TRACERS="proctime" \ gst-launch-1.0 videotestsrc num-buffers=100 ! identity sleep-time=8500 ! tee name=t \ t. ! queue ! identity sleep-time=50000 ! fakesink \ t. ! queue ! identity sleep-time=30000 ! fakesink

Create proctime plot

./gstshark-plot proctime -p

Now you can set the X-axis step on octave console with these commands.

timestamp_max = max(max(tracer.proctime.timestamp_mat))
step=1.5 # X axis step
set(gca, 'xtick', 0:step:timestamp_max);

Also, you can add this code here: plot_tracer.m#L150 to get always the same result.

@CherukuriNaveen
Copy link
Author

Hi @mleivaf

Thanks for your response.

When I generate tracers, created folder contains only two files like below:

  • datastream
  • metadata

tracers folder should contain proctime.mat ?

As I am new to matlab coding, I added above mentioned line at https://github.com/RidgeRun/gst-shark/blob/master/scripts/graphics/plot_tracer.m#L150 and it is giving error:
parse error near line 150 of file /home/naveen/video_analytics/gst_shark/master_shark/gst-shark/scripts/graphics/plot_tracer.m
syntax error

    timestamp_max = max(max(tracer.proctime.timestamp_mat)) step=1.5 # X axis step set(gca, 'xtick', 0:step:timestamp_max);

error: called from
./gstshark-plot.m at line 71 column 5

Best Regards,
Naveen.

@mleivaf
Copy link
Contributor

mleivaf commented Oct 22, 2020

Hi,

The proctime.mat file is created here: gstshark-plot#L133

I am not sure if these scripts work with Matlab, but based on this link: https://www.mathworks.com/help/matlab/ref/xticks.html
I think for Matlab the commands are slightly different:
timestamp_max = max(max(tracer.proctime.timestamp_mat))
step=1.5 # X axis step
xticks(0:step:timestamp_max)

I recommend using GNU Octave for your tests https://www.gnu.org/software/octave/download.html

Regards,
Manuel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants