Commit 5cc962da authored by Rita Sousa's avatar Rita Sousa

Added the necessary NFR modifications for the Jetson AGX Xavier

parent fe21b6ec
......@@ -91,3 +91,4 @@ buildNumber.properties
# Ignore all local history of files
.history
dataclay
// fakeworker4 NUM_THREADS 6
// fakeworker5 NUM_THREADS 4
// fakeworker6 NUM_THREADS 2
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#define NUM_THREADS 6
pthread_t tid[NUM_THREADS];
void *function(void *var)
{
pthread_t id = pthread_self();
for (;;)
{
int n = 500000, i;
unsigned long long fact = 1;
for (i = 1; i <= n; ++i)
{
fact *= i;
}
//printf("%lu\n",id);
usleep(1);
}
}
int main()
{
int i;
for (i = 0; i < NUM_THREADS; i++)
{
pthread_create(&(tid[i]), NULL, &function, NULL);
}
for (i = 0; i < NUM_THREADS; i++)
{
pthread_join((tid[i]), NULL);
}
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
// fakeworker1 n=500000
// fakeworker2 n=50000
// fakeworker3 n=5000
int main(){
for(;;){
int n=500000, i;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
for (;;)
{
int n = 500000, i;
unsigned long long fact = 1;
for (i = 1; i <= n; ++i) {
fact *= i;
for (i = 1; i <= n; ++i)
{
fact *= i;
}
usleep(1);
}
......
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
CFLAGS = -DNV_IS_LDK=1
TARGET = tegrastats
SRC = main.c
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $^
clean:
$(RM) $(TARGET)
.PHONY: clean
This diff is collapsed.
......@@ -114,7 +114,7 @@ public class EnergyMonitor implements Runnable {
// metrics against Workers that have been disabled in the meantime
if (activeWorkers.isWorkerActive(pid)) {
float cpuUsage = activeWorkers.getWorkerCPUUsage(pid);
totalEnergyConsumed = energyMetricsReceived.getFloat("pkg");
totalEnergyConsumed = energyMetricsReceived.getFloat("SOCpower");
activeWorkers.addEnergyConsumed(pid, "power", cpuUsage * totalEnergyConsumed);
}
}
......
......@@ -99,6 +99,7 @@ public class TimeMonitor implements Runnable {
BufferedReader in = new BufferedReader(new InputStreamReader(socketTime.getInputStream()));
while ((inputLine = in.readLine()) != null) {
// New data has arrived, so history metrics must not be accessed
activeWorkers.historyWillBeUpdated();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment