is it possible to install some device which will measure in real time the torque my diesel engine is providing at the moment?
The power the engine outputs at any given time will vary with the load on the engine.

The load on the engine when in normal operation depends on the drive-train efficiency, gear ratio, wheels slippage, the weight of the car, inclines in the road surface, etc.

Real Dynos put a known constant load on the wheels which allows them to calculate horsepower at the wheels.

Doing this just for the engine would require putting a constant load on the engine, which would mean removing the engine from the car and applying a constant load to the flywheel or having a good estimate for the drive-train efficiency, but that tends to vary over various parameters.

The best your going to get for a car on the road is an estimation of wheel horsepower.  You can make a decent guess based on the weight of the car and its acceleration.  You could try to make some sort of correction for inclines/declines based on another accelerometer axis.  

If you wanted to get a guestimate of the flywheel horsepower you can include a factor for drive-train efficiency and adjust for the current transmission gearing.  Alternatively you can estimate based on drive-train efficiency and engine RPM.

If you wanted to contrast that with the actual energy released in the engine, you can calculate that from fuel flow, amount of air taken in, and measuring residual oxygen in the exhaust using a wideband O2 sensor.  You'd find that a LOT of energy goes straight out the tailpipe.