Skip to content

sivachaitanya/node-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express + Python shell examples to execute AI/ML code

How to use?

  • run npm install
  • run npm start to start the dev server with nodemon
  • change the directory path for python bin and python scripts as per your environment in lib/index.js in variables python_installation_path, python_scriptsfolder_path

Pre-Req

API links

Curl

Apache Work Bench to load test the api end point

AB metrics for 30 concurrent users accessing tensorflow model api end point

This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done


Server Software:        
Server Hostname:        localhost
Server Port:            3000

Document Path:          /calltfexample
Document Length:        398 bytes

Concurrency Level:      30
Time taken for tests:   12.702 seconds
Complete requests:      30
Failed requests:        0
Total transferred:      18210 bytes
Total body sent:        6600
HTML transferred:       11940 bytes
Requests per second:    2.36 [#/sec] (mean)
Time per request:       12702.000 [ms] (mean)
Time per request:       423.400 [ms] (mean, across all concurrent requests)
Transfer rate:          1.40 [Kbytes/sec] received
                        0.51 kb/s sent
                        1.91 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.1      1       1
Processing: 11282 12299 402.7  12490   12701
Waiting:    11282 12299 402.7  12490   12701
Total:      11283 12299 402.7  12490   12701

Percentage of the requests served within a certain time (ms)
  50%  12490
  66%  12504
  75%  12577
  80%  12605
  90%  12624
  95%  12642
  98%  12701
  99%  12701
 100%  12701 (longest request)

About

sample node-python integration code for AI/ML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published