How to use deepstream-perf-demo application?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) :Jetson Nano
• DeepStream Version :Deepstream 6.0
• JetPack Version (valid for Jetson only) :Jetpack 4.6
• TensorRT Version :Tensorrt 8.0
• Issue Type( questions, new requirements, bugs):questions

according to the README file,the deepstream-perf-demo shows the performance of deepstream, but the demo does not show the corresponding performance indicators. In addition, the pipeline will continuously loop the videos in the given folder, and it will not end.

Thank you for viewing and hope you can give some guidance.

Some printing information is as follows:(Only two video files are included in the given folder)

Running...
location: ./mp4/sample_720p_copy.h264.
stream_num: 0.
location: ./mp4/sample_720p.h264.
stream_num: 1.
location: ./mp4/sample_720p_copy.h264.
stream_num: 2.
location: ./mp4/sample_720p.h264.
stream_num: 3.
location: ./mp4/sample_720p_copy.h264.
stream_num: 4.
location: ./mp4/sample_720p.h264.
stream_num: 5.
location: ./mp4/sample_720p_copy.h264.
stream_num: 6.
location: ./mp4/sample_720p.h264.
stream_num: 7.
location: ./mp4/sample_720p_copy.h264.
stream_num: 8.
location: ./mp4/sample_720p.h264.
stream_num: 9.
location: ./mp4/sample_720p_copy.h264.
stream_num: 10.

You can close the display window to quit the app.
the app process the streams in the folder specified in the command line in sequence, one end, another one will start to run. you can check the code from source_switch_thread.
If you want to see the performance value, you can add profile_start profile_end profile_result in place you want to check, you also can use deepstream-app to check pipeline performance.

Thank you for your reply, now i have a preliminary understanding of the effect of this demo.

However,i just want the application to process the video data in the folder once, when all the data is processed, the application ends automatically. How can I modify the demo to meet the requirements?

Change like below:
static void get_file_list(char* inputDir) {
if (inputDir == NULL) return;

char *fn = NULL;
int isFile = 1;
std::string fnStd;
std::string dirNameStd(inputDir);
std::string fullName;

DIR *dir = opendir(inputDir);

//while (1) {
    fn = getOneFileName(dir, isFile);

    if (isFile) {
        fnStd = fn;
        fullName = dirNameStd + "/" + fnStd;
        //g_print("name:%s\n", fullName);
        file_list.push_back(fullName);
    } //else {
        //break;
    //}

// }
}

thank you for your reply! I may not express my problem clearly. My problem is to process all the videos in the folder and then finish, not just to process one file in the folder.

change static char *getOneFileName(DIR *pDir, int &isFile) to below

static void getOneFileName(DIR *pDir, char * inputdir) {
    struct dirent *ent;
    int isFile = 0;
    std::string fnStd;
    std::string dirNameStd(inputdir);
    std::string fullName;

    while ((ent = readdir(pDir)) != NULL) {
              if(ent->d_type & DT_REG) {
                isFile = 1;
                fullName = dirNameStd + "/" + ent->d_name;
                file_list.push_back(fullName);


            } else if (strcmp(ent->d_name, ".") == 0 ||
                       strcmp(ent->d_name, "..") == 0) {
                continue;
            } else {
                isFile = 0;
                continue;
            }
    }
}

and change static void get_file_list(char* inputDir) to below:

static void get_file_list(char* inputDir) {
     if (inputDir == NULL) return;

     DIR *dir = opendir(inputDir);

     getOneFileName(dir,inputDir);
}